summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsGroupManager/src')
-rw-r--r--EssentialsGroupManager/src/Changelog.txt3
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java2
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java15
3 files changed, 17 insertions, 3 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt
index 4ea195a5d..57fb16576 100644
--- a/EssentialsGroupManager/src/Changelog.txt
+++ b/EssentialsGroupManager/src/Changelog.txt
@@ -203,4 +203,5 @@ v 2.0:
- Add alphabetically sorted user lists.
- allWorldsDataList now returns fully mirrored worlds which are not identical mirrors (fixes the /manselect list).
- Add support for Rcon.
- - Prevent GM commands from being used on CommandBlocks. \ No newline at end of file
+ - Prevent GM commands from being used on CommandBlocks.
+ - Clear our attachment map upon a manload so we correctly reconfigure a players new permissions. \ No newline at end of file
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();
}