summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src/org/anjocaido
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido')
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java2
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java15
2 files changed, 15 insertions, 2 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
index 117c998d6..6b6637351 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
@@ -1697,7 +1697,7 @@ public class GroupManager extends JavaPlugin {
isLoaded = true;
- BukkitPermissions.updateAllPlayers();
+ BukkitPermissions.reset();
} else {
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
index a4ddcf279..6b02a2286 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
@@ -103,6 +103,11 @@ public class BukkitPermissions {
}
public void reset() {
+
+ /*
+ * collect new permissions
+ * and register all attachments.
+ */
this.collectPermissions();
this.updateAllPlayers();
}
@@ -382,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);
+ }
}
/**
@@ -391,6 +398,12 @@ public class BukkitPermissions {
*/
public void removeAllAttachments() {
+ /*
+ * Remove all attachments.
+ */
+ for (String key : attachments.keySet()) {
+ attachments.get(key).remove();
+ }
attachments.clear();
}