Support ruby-only event handler chains; Add friend/ignore list support and private messaging; Format.

This commit is contained in:
Major-
2014-02-12 17:02:16 +00:00
parent 5964dcb219
commit 832fb67fcd
71 changed files with 1832 additions and 392 deletions
+16
View File
@@ -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>
+11
View File
@@ -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