Another fix for ConcurrentModificationException.

This commit is contained in:
sigonasr2 2016-08-04 00:46:25 -05:00
parent a6b681feae
commit 41cbe5250f
2 changed files with 5 additions and 2 deletions

Binary file not shown.

View File

@ -535,8 +535,11 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
MonsterStructure mon = monsterdata.get(id); MonsterStructure mon = monsterdata.get(id);
Monster m = mon.m; Monster m = mon.m;
if (!m.isValid()) { if (!m.isValid()) {
monsterdata.remove(id); Bukkit.getScheduler().scheduleSyncDelayedTask(plugin,
log("Removed one from Structure",5); () -> {
monsterdata.remove(id);
log("Removed one from Structure",5);
}, 1);
} }
if (mon.isLeader) { if (mon.isLeader) {
//Make it glow red. //Make it glow red.