diff --git a/src/main/java/net/coreprotect/api/QueueLookup.java b/src/main/java/net/coreprotect/api/QueueLookup.java index 0ba41b6..6ba34aa 100644 --- a/src/main/java/net/coreprotect/api/QueueLookup.java +++ b/src/main/java/net/coreprotect/api/QueueLookup.java @@ -3,6 +3,7 @@ package net.coreprotect.api; import java.util.ArrayList; import java.util.Collections; import java.util.List; +import java.util.ListIterator; import java.util.Map; import org.bukkit.Location; @@ -49,7 +50,9 @@ public class QueueLookup extends Queue { Map consumerObject = Consumer.consumerObjects.get(currentConsumer); Location oldLocation = block.getLocation(); - for (Object[] data : consumerData) { + ListIterator iterator = consumerData.listIterator(); + while (iterator.hasNext()) { + Object[] data = iterator.next(); int id = (int) data[0]; int action = (int) data[1]; if (action != Process.BLOCK_BREAK && action != Process.BLOCK_PLACE) {