mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-10-31 09:13:43 +01:00 
			
		
		
		
	Update EventUtils.java
This commit is contained in:
		| @@ -293,7 +293,7 @@ public class EventUtils { | |||||||
|      */ |      */ | ||||||
|     public static boolean shouldProcessEvent(Block block, boolean isExtendEvent) { |     public static boolean shouldProcessEvent(Block block, boolean isExtendEvent) { | ||||||
|         String pistonAction = isExtendEvent ? "EXTEND" : "RETRACT"; |         String pistonAction = isExtendEvent ? "EXTEND" : "RETRACT"; | ||||||
|         String lastAction = block.hasMetadata(mcMMO.pistonDataKey) ? block.getMetadata(mcMMO.pistonDataKey).get(0).asString() : ""; |         String lastAction = block.hasMetadata(mcMMO.pistonDataKey) ? block.getMetadata(mcMMO.pistonDataKey).getSize()>0 ? block.getMetadata(mcMMO.pistonDataKey).get(0).asString() : "":""; | ||||||
|  |  | ||||||
|         if (!lastAction.equals(pistonAction)) { |         if (!lastAction.equals(pistonAction)) { | ||||||
|             block.setMetadata(mcMMO.pistonDataKey, new FixedMetadataValue(mcMMO.p, pistonAction)); |             block.setMetadata(mcMMO.pistonDataKey, new FixedMetadataValue(mcMMO.p, pistonAction)); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Yannick L
					Yannick L