Fix regen after death on block damages
This commit is contained in:
@@ -294,6 +294,8 @@ public class Bot extends ServerPlayer implements Terminator {
|
|||||||
|
|
||||||
updateLocation();
|
updateLocation();
|
||||||
|
|
||||||
|
if (!isAlive()) return;
|
||||||
|
|
||||||
float health = getHealth();
|
float health = getHealth();
|
||||||
float maxHealth = getMaxHealth();
|
float maxHealth = getMaxHealth();
|
||||||
float regenAmount = 0.025f;
|
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"
|
// this should fix the concurrentmodificationexception mentioned above, I used the ConcurrentHashMap.newKeySet to make a "ConcurrentHashSet"
|
||||||
plugin.getManager().remove(this);
|
plugin.getManager().remove(this);
|
||||||
|
|
||||||
scheduler.runTaskLater(plugin, this::removeBot, 30);
|
scheduler.runTaskLater(plugin, this::removeBot, 20);
|
||||||
|
|
||||||
this.removeTab();
|
this.removeTab();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user