From eacb847305b70cd0e967caef1a56dc484167c591 Mon Sep 17 00:00:00 2001 From: ElgarL Date: Wed, 9 Jan 2013 04:04:59 +0000 Subject: [PATCH] Remove attachments before clearing --- .../groupmanager/permissions/BukkitPermissions.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java index a39450de3..ffdc51616 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java @@ -103,6 +103,15 @@ public class BukkitPermissions { } public void reset() { + + /* + * Remove all attachments. + */ + for (String key : attachments.keySet()) { + attachments.get(key).remove(); + attachments.remove(key); + } + attachments = new WeakHashMap(); this.collectPermissions();