From 7d05d53f9e62a29c14dcddebd5efbede2fc759f1 Mon Sep 17 00:00:00 2001 From: GJ Date: Fri, 18 May 2012 14:40:48 -0400 Subject: [PATCH] Whoops. Can't initialize something that doesn't exist. --- .../com/gmail/nossr50/listeners/BlockListener.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java index ecb979b50..3effe3eb4 100644 --- a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java @@ -41,8 +41,6 @@ import org.getspout.spoutapi.sound.SoundEffect; public class BlockListener implements Listener { private final mcMMO plugin; - private static Config configInstance = Config.getInstance(); - private static Permissions permInstance = Permissions.getInstance(); public BlockListener(final mcMMO plugin) { this.plugin = plugin; @@ -95,6 +93,8 @@ public class BlockListener implements Listener { */ @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onBlockPlace(BlockPlaceEvent event) { + Config configInstance = Config.getInstance(); + Block block = event.getBlock(); Player player = event.getPlayer(); int id = block.getTypeId(); @@ -136,6 +136,9 @@ public class BlockListener implements Listener { Block block = event.getBlock(); ItemStack inHand = player.getItemInHand(); + Config configInstance = Config.getInstance(); + Permissions permInstance = Permissions.getInstance(); + if (event instanceof FakeBlockBreakEvent) { return; } @@ -225,6 +228,9 @@ public class BlockListener implements Listener { Block block = event.getBlock(); Material material = block.getType(); + Config configInstance = Config.getInstance(); + Permissions permInstance = Permissions.getInstance(); + /* * ABILITY PREPARATION CHECKS */