summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src/org
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2012-04-05 21:06:48 +0100
committerElgarL <ElgarL@palmergames.com>2012-04-05 21:06:48 +0100
commitbd7af593e7e77df0d59f32cf5b3b7d4170682af3 (patch)
tree9a771b98df3d4e69b219975040c19a47fe6f5a5a /EssentialsGroupManager/src/org
parentf7bc04bc347c088d35ee5a939c026f28b2ce0c19 (diff)
downloadEssentials-bd7af593e7e77df0d59f32cf5b3b7d4170682af3.tar
Essentials-bd7af593e7e77df0d59f32cf5b3b7d4170682af3.tar.gz
Essentials-bd7af593e7e77df0d59f32cf5b3b7d4170682af3.tar.lz
Essentials-bd7af593e7e77df0d59f32cf5b3b7d4170682af3.tar.xz
Essentials-bd7af593e7e77df0d59f32cf5b3b7d4170682af3.zip
Don't throw errors when attempting to remove permission attachments
(bukkit will have already removed it).
Diffstat (limited to 'EssentialsGroupManager/src/org')
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java9
1 files changed, 8 insertions, 1 deletions
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);
}
}