mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-04-26 16:39:45 +00:00
Remove attachments BEFORE we clear them.
This commit is contained in:
parent
5056210a38
commit
b9af4fb35c
1 changed files with 9 additions and 9 deletions
|
@ -104,14 +104,6 @@ public class BukkitPermissions {
|
|||
|
||||
public void reset() {
|
||||
|
||||
/*
|
||||
* Remove all attachments.
|
||||
*/
|
||||
for (String key : attachments.keySet()) {
|
||||
attachments.get(key).remove();
|
||||
attachments.remove(key);
|
||||
}
|
||||
|
||||
/*
|
||||
* collect new permissions
|
||||
* and register all attachments.
|
||||
|
@ -395,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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -404,6 +398,12 @@ public class BukkitPermissions {
|
|||
*/
|
||||
public void removeAllAttachments() {
|
||||
|
||||
/*
|
||||
* Remove all attachments.
|
||||
*/
|
||||
for (String key : attachments.keySet()) {
|
||||
attachments.get(key).remove();
|
||||
}
|
||||
attachments.clear();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue