This commit is contained in:
Olof Larsson 2011-10-16 12:12:49 +02:00
parent 3d33088f47
commit aad9819ae9
2 changed files with 7 additions and 1 deletions

View File

@ -122,6 +122,11 @@ public abstract class MPlugin extends JavaPlugin
Bukkit.getServer().getPluginManager().registerEvent(type, listener, priority, this);
}
public void registerEvent(Event.Type type, Listener listener)
{
registerEvent(type, listener, Event.Priority.Normal);
}
// -------------------------------------------- //
// Some inits...
// You are supposed to override these in the plugin if you aren't satisfied with the defaults

View File

@ -19,6 +19,7 @@ public class MPluginSecretServerListener extends ServerListener
// reference command will be used to prevent "unknown command" console messages
try
{
@SuppressWarnings("unchecked")
Map<String, Object> refCmd = (Map<String, Object>) p.getDescription().getCommands();
if (refCmd != null && !refCmd.isEmpty())
refCommand = (String)(refCmd.keySet().toArray()[0]);