fix mentioned ConcurrentModificationException

This commit is contained in:
Badbird-5907
2021-08-26 19:18:09 -04:00
parent 2481c05831
commit 33514bffeb
2 changed files with 4 additions and 2 deletions

View File

@@ -498,7 +498,8 @@ public class Bot extends EntityPlayer {
private void dieCheck() {
if (removeOnDeath) {
scheduler.runTask(plugin, () -> plugin.getManager().remove(this)); // maybe making this later will fix the concurrentmodificationexception?
//scheduler.runTask(plugin, () -> plugin.getManager().remove(this)); // maybe making this later will fix the concurrentmodificationexception?
plugin.getManager().remove(this); //this should fix the concurrentmodificationexception mentioned above, I used the ConcurrentHashMap.newKeySet to make a "ConcurrentHashSet"
scheduler.runTaskLater(plugin, this::setDead, 30);
this.removeTab();