mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-06 21:18:03 +02:00
Don't throw errors when attempting to remove permission attachments
(bukkit will have already removed it).
This commit is contained in:
parent
f7bc04bc34
commit
bd7af593e7
@ -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.
|
||||
- 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).
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user