From 6bc6b8bf5aae0e9100872951130bbb948d5c76d6 Mon Sep 17 00:00:00 2001 From: angelsl Date: Sat, 1 Jan 2011 22:17:43 +0800 Subject: [PATCH] Fix oversight. :) --- src/WorldEdit.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/WorldEdit.java b/src/WorldEdit.java index b3ef627b9..3d943e3f6 100644 --- a/src/WorldEdit.java +++ b/src/WorldEdit.java @@ -35,7 +35,7 @@ public class WorldEdit extends Plugin { /** * WorldEditLibrary instance. */ - private static final HMWorldEditListener listener = new HMWorldEditListener(); + private static HMWorldEditListener listener; /** * WorldEdit version, fetched from the .jar's manifest. Used to print the @@ -50,6 +50,10 @@ public class WorldEdit extends Plugin { public void initialize() { PluginLoader loader = etc.getLoader(); + ServerInterface.setup(new HMServerInterface()); + + listener = new HMWorldEditListener(); + loader.addListener(PluginLoader.Hook.BLOCK_CREATED, listener, this, PluginListener.Priority.MEDIUM); loader.addListener(PluginLoader.Hook.BLOCK_DESTROYED, listener, this, @@ -62,8 +66,6 @@ public class WorldEdit extends Plugin { PluginListener.Priority.MEDIUM); loader.addListener(PluginLoader.Hook.ARM_SWING, listener, this, PluginListener.Priority.MEDIUM); - - ServerInterface.setup(new HMServerInterface()); logger.log(Level.INFO, "WorldEdit version " + getVersion() + " loaded"); }