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 | 0d86b36777350489e0c938aa3386eee0ed97cdfb (patch) | |
tree | f281fc912ffe014dbc49a423a1816eb444506000 /EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java | |
parent | d85d91611c2948abc99716bc124a2e52c75a28a9 (diff) | |
download | Essentials-0d86b36777350489e0c938aa3386eee0ed97cdfb.tar Essentials-0d86b36777350489e0c938aa3386eee0ed97cdfb.tar.gz Essentials-0d86b36777350489e0c938aa3386eee0ed97cdfb.tar.lz Essentials-0d86b36777350489e0c938aa3386eee0ed97cdfb.tar.xz Essentials-0d86b36777350489e0c938aa3386eee0ed97cdfb.zip |
Add chat configurables.
Diffstat (limited to 'EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java')
-rw-r--r-- | EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java | 15 |
1 files changed, 9 insertions, 6 deletions
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 ""; } } |