Fix regen after death on block damages

This commit is contained in:
ThisTestUser
2022-10-19 15:35:03 -04:00
parent cd275341cb
commit 5d766d6a17

View File

@@ -294,6 +294,8 @@ public class Bot extends ServerPlayer implements Terminator {
updateLocation();
if (!isAlive()) return;
float health = getHealth();
float maxHealth = getMaxHealth();
float regenAmount = 0.025f;
@@ -704,7 +706,7 @@ public class Bot extends ServerPlayer implements Terminator {
// this should fix the concurrentmodificationexception mentioned above, I used the ConcurrentHashMap.newKeySet to make a "ConcurrentHashSet"
plugin.getManager().remove(this);
scheduler.runTaskLater(plugin, this::removeBot, 30);
scheduler.runTaskLater(plugin, this::removeBot, 20);
this.removeTab();
}