fix mentioned ConcurrentModificationException
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user