forked from github-mirror/CoreProtect
Fixed ConcurrentModificationException when using queueLookup in API (fixes #481)
This commit is contained in:
1 parent
7ccb3eff34
commit
a1458a38be
1 file changed
+1
-4
@@ -3,7 +3,6 @@ package net.coreprotect.api;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.ListIterator;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@@ -70,9 +69,7 @@ public class QueueLookup extends Queue {
|
|||||||
Location blockLocation = block.getLocation();
|
Location blockLocation = block.getLocation();
|
||||||
|
|
||||||
// Check for block actions in the processing queue
|
// Check for block actions in the processing queue
|
||||||
ListIterator<Object[]> iterator = consumerData.listIterator();
|
for (Object[] data : consumerData.toArray(Object[][]::new)) {
|
||||||
while (iterator.hasNext()) {
|
|
||||||
Object[] data = iterator.next();
|
|
||||||
int id = (int) data[0];
|
int id = (int) data[0];
|
||||||
int action = (int) data[1];
|
int action = (int) data[1];
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user