mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 16:49:11 +00:00
Support ruby-only event handler chains; Add friend/ignore list support and private messaging; Format.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0"?>
|
||||
<plugin>
|
||||
<id>chat-privacy</id>
|
||||
<version>1</version>
|
||||
<name>Chat privacy</name>
|
||||
<description>Adds chat privacy support.</description>
|
||||
<authors>
|
||||
<author>Major</author>
|
||||
</authors>
|
||||
<scripts>
|
||||
<script>privacy.rb</script>
|
||||
</scripts>
|
||||
<dependencies>
|
||||
<dependency>private-messaging</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
@@ -0,0 +1,11 @@
|
||||
require 'java'
|
||||
|
||||
java_import 'org.apollo.game.model.settings.PrivacyState'
|
||||
|
||||
on :event, :privacy_option do |ctx, player, event|
|
||||
player.chat_privacy = event.chat_privacy
|
||||
player.friend_privacy = event.friend_privacy
|
||||
player.trade_privacy = event.trade_privacy
|
||||
|
||||
update_friends(player, event.friend_privacy == PrivacyState::OFF ? 0 : player.world_id)
|
||||
end
|
||||
Reference in New Issue
Block a user