1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-06 22:56:41 +02:00

Remove attachments BEFORE we clear them.

This commit is contained in:
ElgarL
2013-01-09 04:27:10 +00:00
parent 314a4c38e6
commit cb0b621e87

View File

@@ -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();
}