diff options
-rw-r--r-- | EssentialsGroupManager/src/Changelog.txt | 3 | ||||
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java | 9 |
2 files changed, 10 insertions, 2 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index c5fe5564d..2cfe57f62 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -163,4 +163,5 @@ v 1.9: - Prevent Null entries in group inheritance from throwing errors.
v 2.0:
- Fix GM reporting of permission inheritance to retain the correct order. Lower inheritance groups can no longer negate a higher groups permissions.
- - Fix an error I caused trying to modify an unmodifiable list when parsing '*' permissions.
\ No newline at end of file + - Fix an error I caused trying to modify an unmodifiable list when parsing '*' permissions.
+ - Don't throw errors when attempting to remove permission attachments (bukkit will have already removed it).
\ No newline at end of file diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java index 5c711351e..6df18cb05 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java @@ -351,7 +351,14 @@ public class BukkitPermissions { */
private void removeAttachment(Player player) {
if (attachments.containsKey(player)) {
- player.removeAttachment(attachments.get(player));
+ try {
+ player.removeAttachment(attachments.get(player));
+ } catch (IllegalArgumentException e) {
+ /*
+ * Failed to remove attachment
+ * This usually means Bukkit no longer know of it.
+ */
+ }
attachments.remove(player);
}
}
|