diff options
author | KHobbits <rob@khobbits.co.uk> | 2012-01-18 22:53:39 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2012-01-18 22:53:39 +0000 |
commit | c2b08079d7e182cbad0132210ba74003ea5b07fd (patch) | |
tree | 256e40c0d0805d082a5dd41b82637f9ce31b66f9 /EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java | |
parent | e1b44c28e320b0f7515b1f6f75fed6a5ecc7f189 (diff) | |
download | Essentials-c2b08079d7e182cbad0132210ba74003ea5b07fd.tar Essentials-c2b08079d7e182cbad0132210ba74003ea5b07fd.tar.gz Essentials-c2b08079d7e182cbad0132210ba74003ea5b07fd.tar.lz Essentials-c2b08079d7e182cbad0132210ba74003ea5b07fd.tar.xz Essentials-c2b08079d7e182cbad0132210ba74003ea5b07fd.zip |
Reduce duplicate calls in EssentialsChat
Should cut the time down a little.
Diffstat (limited to 'EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java')
-rw-r--r-- | EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java index 25ce85cc8..de0d14421 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java @@ -18,7 +18,6 @@ public class EssentialsChat extends JavaPlugin { private static final Logger LOGGER = Logger.getLogger("Minecraft"); private transient Map<String, IEssentialsChatListener> chatListener; - @Override public void onEnable() @@ -36,12 +35,12 @@ public class EssentialsChat extends JavaPlugin } chatListener = new ConcurrentSkipListMap<String, IEssentialsChatListener>(); - final Map<PlayerChatEvent, String> charges = new HashMap<PlayerChatEvent, String>(); - + final Map<PlayerChatEvent, ChatStore> chatStore = new HashMap<PlayerChatEvent, ChatStore>(); - final EssentialsChatPlayerListenerLowest playerListenerLowest = new EssentialsChatPlayerListenerLowest(getServer(), ess, chatListener); - final EssentialsChatPlayerListenerNormal playerListenerNormal = new EssentialsChatPlayerListenerNormal(getServer(), ess, chatListener, charges); - final EssentialsChatPlayerListenerHighest playerListenerHighest = new EssentialsChatPlayerListenerHighest(getServer(), ess, chatListener, charges); + + final EssentialsChatPlayerListenerLowest playerListenerLowest = new EssentialsChatPlayerListenerLowest(getServer(), ess, chatListener, chatStore); + final EssentialsChatPlayerListenerNormal playerListenerNormal = new EssentialsChatPlayerListenerNormal(getServer(), ess, chatListener, chatStore); + final EssentialsChatPlayerListenerHighest playerListenerHighest = new EssentialsChatPlayerListenerHighest(getServer(), ess, chatListener, chatStore); pluginManager.registerEvent(Type.PLAYER_CHAT, playerListenerLowest, Priority.Lowest, this); pluginManager.registerEvent(Type.PLAYER_CHAT, playerListenerNormal, Priority.Normal, this); pluginManager.registerEvent(Type.PLAYER_CHAT, playerListenerHighest, Priority.Highest, this); |