mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-08-21 02:42:01 +00:00
Fix a concurrent modification error when removing all attachments.
This commit is contained in:
parent
1c0a5c49a5
commit
e8dd963545
|
@ -167,3 +167,4 @@ v 2.0:
|
|||
- 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.
|
||||
- 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