Updated the remaining Listeners to the new event system.

This commit is contained in:
TomyLobo
2012-01-18 17:50:07 +01:00
parent edc955c5b6
commit 4e4a5a02c9
4 changed files with 11 additions and 19 deletions

View File

@ -30,7 +30,6 @@ import org.bukkit.Bukkit;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandMap;
import org.bukkit.command.SimpleCommandMap;
import org.bukkit.event.Event;
import org.bukkit.plugin.Plugin;
/**
@ -71,8 +70,7 @@ public class CommandRegistration {
Bukkit.getServer().getLogger().severe(plugin.getDescription().getName() +
": Could not retrieve server CommandMap, using fallback instead! Please report to http://redmine.sk89q.com");
fallbackCommands = commandMap = new SimpleCommandMap(Bukkit.getServer());
Bukkit.getServer().getPluginManager().registerEvent(Event.Type.PLAYER_COMMAND_PREPROCESS,
new FallbackRegistrationListener(fallbackCommands), Event.Priority.Normal, plugin);
Bukkit.getServer().getPluginManager().registerEvents(new FallbackRegistrationListener(fallbackCommands), plugin);
}
}
return commandMap;