Cleaned up bukkit event registration a bit and fixed 2 warnings.

This commit is contained in:
TomyLobo 2011-08-26 17:25:18 +02:00
parent 3f58187790
commit 8ac8cb77a5

View File

@ -135,7 +135,9 @@ protected void loadConfiguration() {
* Register the events used by WorldEdit.
*/
protected void registerEvents() {
@SuppressWarnings("unused")
PlayerListener playerListener = new WorldEditPlayerListener(this);
@SuppressWarnings("unused")
PlayerListener criticalPlayerListener = new WorldEditCriticalPlayerListener(this);
// The permissions resolver has some hooks of its own
@ -152,7 +154,7 @@ protected void registerEvents() {
public void registerEvent(String typeName, Listener listener, Priority priority) {
try {
Event.Type type = Event.Type.valueOf(typeName);
this.getServer().getPluginManager().registerEvent(type, listener, priority, this);
getServer().getPluginManager().registerEvent(type, listener, priority, this);
} catch (IllegalArgumentException e) {
logger.info("WorldEdit: Unable to register missing event type " + typeName);
}