mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Fix a concurrent modification error when removing all attachments.
This commit is contained in:
parent
1c0a5c49a5
commit
e8dd963545
2 changed files with 8 additions and 3 deletions
|
@ -166,4 +166,5 @@ v 2.0:
|
|||
- 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).
|
||||
- Remove all permission attachments when performing a manload or restart.
|
||||
- Expand 'manwhois' to also list a users subgroups.
|
||||
- Expand 'manwhois' to also list a users subgroups.
|
||||
- Fix a concurrent modification error when removing all attachments.
|
|
@ -20,6 +20,7 @@ import java.lang.reflect.Field;
|
|||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
@ -368,8 +369,11 @@ public class BukkitPermissions {
|
|||
*/
|
||||
public void removeAllAttachments() {
|
||||
|
||||
for (Player player : attachments.keySet())
|
||||
removeAttachment(player);
|
||||
Iterator<Player> itr = attachments.keySet().iterator();
|
||||
|
||||
while (itr.hasNext()){
|
||||
removeAttachment(itr.next());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue