diff options
author | KHobbits <rob@khobbits.co.uk> | 2014-03-30 15:50:32 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2014-03-30 15:50:32 +0100 |
commit | 0e6a5240db2134147b5f13cba7cc4cf99809ba6f (patch) | |
tree | 78b0ba48d7ce8cc90f8e7a2097b1fe9849d8a0b2 /EssentialsChat/src | |
parent | f272a7ecd61e5870ce4a86e5101592ff16a59ea9 (diff) | |
download | Essentials-0e6a5240db2134147b5f13cba7cc4cf99809ba6f.tar Essentials-0e6a5240db2134147b5f13cba7cc4cf99809ba6f.tar.gz Essentials-0e6a5240db2134147b5f13cba7cc4cf99809ba6f.tar.lz Essentials-0e6a5240db2134147b5f13cba7cc4cf99809ba6f.tar.xz Essentials-0e6a5240db2134147b5f13cba7cc4cf99809ba6f.zip |
Add chat configurables.
Diffstat (limited to 'EssentialsChat/src')
-rw-r--r-- | EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java | 1 | ||||
-rw-r--r-- | EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java | 15 |
2 files changed, 9 insertions, 7 deletions
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java index 3ce515f3b..d8b40d36c 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java @@ -33,7 +33,6 @@ public class EssentialsChat extends JavaPlugin final Map<AsyncPlayerChatEvent, ChatStore> chatStore = Collections.synchronizedMap(new HashMap<AsyncPlayerChatEvent, ChatStore>()); - final EssentialsChatPlayerListenerLowest playerListenerLowest = new EssentialsChatPlayerListenerLowest(getServer(), ess, chatStore); final EssentialsChatPlayerListenerNormal playerListenerNormal = new EssentialsChatPlayerListenerNormal(getServer(), ess, chatStore); final EssentialsChatPlayerListenerHighest playerListenerHighest = new EssentialsChatPlayerListenerHighest(getServer(), ess, chatStore); diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java index 6c97d91ed..8b8737e14 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java @@ -47,15 +47,18 @@ public abstract class EssentialsChatPlayer implements Listener //Ignore empty chat events generated by plugins return ""; } - switch (message.charAt(0)) + + final char prefix = message.charAt(0); + if (prefix == ess.getSettings().getChatShout()) { - case '!': return "shout"; - case '?': + } + else if (prefix == ess.getSettings().getChatQuestion()) + { return "question"; - //case '@': - //return "admin"; - default: + } + else + { return ""; } } |