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 | |
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')
-rw-r--r-- | EssentialsGroupManager/src/Changelog.txt | 3 | ||||
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index 42b7b989c..f699c3f6f 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -166,4 +166,5 @@ v 2.0: - Fix an error I caused trying to modify an unmodifiable list when parsing '*' permissions.
- Don't throw errors when attempting to remove permission attachments (bukkit will have already removed it).
- Remove all permission attachments when performing a manload or restart.
- - Expand 'manwhois' to also list a users subgroups.
\ No newline at end of file + - Expand 'manwhois' to also list a users subgroups.
+ - Fix a concurrent modification error when removing all attachments.
\ No newline at end of file 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());
+ }
}
/**
|