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

Dieser Commit ist enthalten in:
TomyLobo 2011-08-26 17:25:18 +02:00
Ursprung 3f58187790
Commit 8ac8cb77a5

Datei anzeigen

@ -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);
}