From 8ac8cb77a5261a6d7e1e027379e9bb424749f209 Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Fri, 26 Aug 2011 17:25:18 +0200 Subject: [PATCH] Cleaned up bukkit event registration a bit and fixed 2 warnings. --- src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java b/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java index bd556feee..cbcd1531d 100644 --- a/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java +++ b/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java @@ -135,7 +135,9 @@ public class WorldEditPlugin extends JavaPlugin { * 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 @@ public class WorldEditPlugin extends JavaPlugin { 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); }