From 4954e1f63baf1dc45dcbfb7ee06efdf57414ea45 Mon Sep 17 00:00:00 2001 From: Yannick L Date: Sun, 1 Mar 2015 20:17:31 +0100 Subject: [PATCH] Update EventUtils.java --- src/main/java/com/gmail/nossr50/util/EventUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/util/EventUtils.java b/src/main/java/com/gmail/nossr50/util/EventUtils.java index e8c26dc18..6fdcc5f35 100644 --- a/src/main/java/com/gmail/nossr50/util/EventUtils.java +++ b/src/main/java/com/gmail/nossr50/util/EventUtils.java @@ -293,7 +293,7 @@ public class EventUtils { */ public static boolean shouldProcessEvent(Block block, boolean isExtendEvent) { String pistonAction = isExtendEvent ? "EXTEND" : "RETRACT"; - String lastAction = block.hasMetadata(mcMMO.pistonDataKey) ? block.getMetadata(mcMMO.pistonDataKey).getSize()>0 ? block.getMetadata(mcMMO.pistonDataKey).get(0).asString() : "":""; + String lastAction = block.hasMetadata(mcMMO.pistonDataKey) ? block.getMetadata(mcMMO.pistonDataKey).size()>0 ? block.getMetadata(mcMMO.pistonDataKey).get(0).asString() : "":""; if (!lastAction.equals(pistonAction)) { block.setMetadata(mcMMO.pistonDataKey, new FixedMetadataValue(mcMMO.p, pistonAction));