diff options
Diffstat (limited to 'EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java')
-rw-r--r-- | EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java index 7a10d9a92..f547f0da0 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java @@ -1,7 +1,7 @@ package com.earth2me.essentials.chat; +import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.IEssentials; -import com.earth2me.essentials.Util; import java.util.HashMap; import java.util.Map; import java.util.logging.Level; @@ -24,25 +24,29 @@ public class EssentialsChat extends JavaPlugin chatListener = new HashMap<String, IEssentialsChatListener>(); - final EssentialsChatPlayerListener playerListener = new EssentialsChatPlayerListener(getServer(), ess, chatListener); - pluginManager.registerEvent(Type.PLAYER_CHAT, playerListener, Priority.High, this); + final EssentialsChatPlayerListenerLowest playerListenerLowest = new EssentialsChatPlayerListenerLowest(getServer(), ess, chatListener); + final EssentialsChatPlayerListenerNormal playerListenerNormal = new EssentialsChatPlayerListenerNormal(getServer(), ess, chatListener); + final EssentialsChatPlayerListenerHighest playerListenerHighest = new EssentialsChatPlayerListenerHighest(getServer(), ess, chatListener); + 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); if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion())) { - LOGGER.log(Level.WARNING, Util.i18n("versionMismatchAll")); + LOGGER.log(Level.WARNING, _("versionMismatchAll")); } - LOGGER.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team")); + LOGGER.info(_("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team")); } public void onDisable() { chatListener.clear(); } - + public void addEssentialsChatListener(final String plugin, final IEssentialsChatListener listener) { chatListener.put(plugin, listener); } - + public IEssentialsChatListener removeEssentialsChatListener(final String plugin) { return chatListener.remove(plugin); |