summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2013-01-09 04:27:10 +0000
committerElgarL <ElgarL@palmergames.com>2013-01-09 04:27:10 +0000
commitb9af4fb35c06974b930c3e3a751d8aef9e64bc97 (patch)
tree2556f3395772abfc76943ea17e7dc4f02595b152 /EssentialsGroupManager
parent5056210a38522d71e5eb8b0ba2fc8e6aad8d958b (diff)
downloadEssentials-b9af4fb35c06974b930c3e3a751d8aef9e64bc97.tar
Essentials-b9af4fb35c06974b930c3e3a751d8aef9e64bc97.tar.gz
Essentials-b9af4fb35c06974b930c3e3a751d8aef9e64bc97.tar.lz
Essentials-b9af4fb35c06974b930c3e3a751d8aef9e64bc97.tar.xz
Essentials-b9af4fb35c06974b930c3e3a751d8aef9e64bc97.zip
Remove attachments BEFORE we clear them.
Diffstat (limited to 'EssentialsGroupManager')
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
index 4d9e0ba1c..6b02a2286 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
@@ -105,14 +105,6 @@ public class BukkitPermissions {
public void reset() {
/*
- * Remove all attachments.
- */
- for (String key : attachments.keySet()) {
- attachments.get(key).remove();
- attachments.remove(key);
- }
-
- /*
* collect new permissions
* and register all attachments.
*/
@@ -395,8 +387,10 @@ public class BukkitPermissions {
*/
private void removeAttachment(String playerName) {
- if (attachments.containsKey(playerName))
+ if (attachments.containsKey(playerName)) {
+ attachments.get(playerName).remove();
attachments.remove(playerName);
+ }
}
/**
@@ -404,6 +398,12 @@ public class BukkitPermissions {
*/
public void removeAllAttachments() {
+ /*
+ * Remove all attachments.
+ */
+ for (String key : attachments.keySet()) {
+ attachments.get(key).remove();
+ }
attachments.clear();
}