mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 11:40:40 +00:00
Fix Exceptions
This commit is contained in:
parent
6453cc9897
commit
a11eb336e6
1 changed files with 68 additions and 58 deletions
|
@ -1,7 +1,9 @@
|
|||
package com.projectkorra.ProjectKorra.airbending;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.ConcurrentModificationException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
|
@ -81,7 +83,12 @@ public class Suffocate {
|
|||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
for (Entity entity: targets.keySet()) {
|
||||
if (!targets.keySet().iterator().hasNext()) {
|
||||
remove(player);
|
||||
return;
|
||||
}
|
||||
if (targets.isEmpty()) {
|
||||
remove(player);
|
||||
return;
|
||||
|
@ -138,6 +145,9 @@ public class Suffocate {
|
|||
entity.teleport(entity);
|
||||
}
|
||||
}
|
||||
} catch (ConcurrentModificationException e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void progressAll() {
|
||||
|
|
Loading…
Reference in a new issue