From aad9819ae94f17e87a26ca0a85a84e88ad15e5ec Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Sun, 16 Oct 2011 12:12:49 +0200 Subject: [PATCH] herp --- src/com/massivecraft/factions/zcore/MPlugin.java | 7 ++++++- .../factions/zcore/MPluginSecretServerListener.java | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/com/massivecraft/factions/zcore/MPlugin.java b/src/com/massivecraft/factions/zcore/MPlugin.java index 421379cb..ef6def17 100644 --- a/src/com/massivecraft/factions/zcore/MPlugin.java +++ b/src/com/massivecraft/factions/zcore/MPlugin.java @@ -119,7 +119,12 @@ public abstract class MPlugin extends JavaPlugin public void registerEvent(Event.Type type, Listener listener, Event.Priority priority) { - Bukkit.getServer().getPluginManager().registerEvent(type, listener, priority, this); + Bukkit.getServer().getPluginManager().registerEvent(type, listener, priority, this); + } + + public void registerEvent(Event.Type type, Listener listener) + { + registerEvent(type, listener, Event.Priority.Normal); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/zcore/MPluginSecretServerListener.java b/src/com/massivecraft/factions/zcore/MPluginSecretServerListener.java index 90e62220..678dc40f 100644 --- a/src/com/massivecraft/factions/zcore/MPluginSecretServerListener.java +++ b/src/com/massivecraft/factions/zcore/MPluginSecretServerListener.java @@ -19,6 +19,7 @@ public class MPluginSecretServerListener extends ServerListener // reference command will be used to prevent "unknown command" console messages try { + @SuppressWarnings("unchecked") Map refCmd = (Map) p.getDescription().getCommands(); if (refCmd != null && !refCmd.isEmpty()) refCommand = (String)(refCmd.keySet().toArray()[0]);