mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 12:23:59 +00: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
2 changed files with 10 additions and 2 deletions
|
@ -164,3 +164,4 @@ v 1.9:
|
||||||
v 2.0:
|
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 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) {
|
private void removeAttachment(Player player) {
|
||||||
if (attachments.containsKey(player)) {
|
if (attachments.containsKey(player)) {
|
||||||
|
try {
|
||||||
player.removeAttachment(attachments.get(player));
|
player.removeAttachment(attachments.get(player));
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
/*
|
||||||
|
* Failed to remove attachment
|
||||||
|
* This usually means Bukkit no longer know of it.
|
||||||
|
*/
|
||||||
|
}
|
||||||
attachments.remove(player);
|
attachments.remove(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue