diff options
author | ElgarL <ElgarL@palmergames.com> | 2012-04-10 17:02:50 +0100 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2012-04-10 17:02:50 +0100 |
commit | 5e5038d05c60f034b2b5e29b8692241926d980a4 (patch) | |
tree | f300f418ba5f7dfa503fd8ae58e0173f30af3703 | |
parent | 930c2809a491c7f3e424250de3a51be90743ea68 (diff) | |
download | Essentials-5e5038d05c60f034b2b5e29b8692241926d980a4.tar Essentials-5e5038d05c60f034b2b5e29b8692241926d980a4.tar.gz Essentials-5e5038d05c60f034b2b5e29b8692241926d980a4.tar.lz Essentials-5e5038d05c60f034b2b5e29b8692241926d980a4.tar.xz Essentials-5e5038d05c60f034b2b5e29b8692241926d980a4.zip |
Properly fix concurrent modification when removing all attachments.
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java index 51f019efc..516679544 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java @@ -357,7 +357,7 @@ public class BukkitPermissions { } catch (IllegalArgumentException e) {
/*
* Failed to remove attachment
- * This usually means Bukkit no longer know of it.
+ * This usually means Bukkit no longer knows of it.
*/
}
attachments.remove(player);
@@ -372,8 +372,17 @@ public class BukkitPermissions { Iterator<Player> itr = attachments.keySet().iterator();
while (itr.hasNext()){
- removeAttachment(itr.next());
+ Player player = itr.next();
+ try {
+ player.removeAttachment(attachments.get(player));
+ } catch (IllegalArgumentException e) {
+ /*
+ * Failed to remove attachment
+ * This usually means Bukkit no longer knows of it.
+ */
+ }
}
+ attachments.clear();
}
/**
|