diff options
author | ElgarL <ElgarL@palmergames.com> | 2012-04-07 17:21:48 +0100 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2012-04-07 17:21:48 +0100 |
commit | e8dd96354592de9cd8b43d6eeca332417e1708f9 (patch) | |
tree | 343a7679e87885aec44097ea34e6368ed9a8299c /EssentialsGroupManager/src/org/anjocaido | |
parent | 1c0a5c49a5c1ecd0708823034b0c8726c965cb16 (diff) | |
download | Essentials-e8dd96354592de9cd8b43d6eeca332417e1708f9.tar Essentials-e8dd96354592de9cd8b43d6eeca332417e1708f9.tar.gz Essentials-e8dd96354592de9cd8b43d6eeca332417e1708f9.tar.lz Essentials-e8dd96354592de9cd8b43d6eeca332417e1708f9.tar.xz Essentials-e8dd96354592de9cd8b43d6eeca332417e1708f9.zip |
Fix a concurrent modification error when removing all attachments.
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java index 3b66c1eb9..51f019efc 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java @@ -20,6 +20,7 @@ import java.lang.reflect.Field; import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
@@ -368,8 +369,11 @@ public class BukkitPermissions { */
public void removeAllAttachments() {
- for (Player player : attachments.keySet())
- removeAttachment(player);
+ Iterator<Player> itr = attachments.keySet().iterator();
+
+ while (itr.hasNext()){
+ removeAttachment(itr.next());
+ }
}
/**
|