Skip to content
Permalink
Browse files

Enforce void damage, fixes #16

  • Loading branch information...
mcmonkey4eva committed Apr 19, 2016
1 parent 623ce10 commit 5673c10e91d3b50c8b49620eb30f7f6dad4e3de7
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/main/java/org/mcmonkey/sentinel/SentinelTrait.java
@@ -945,6 +945,12 @@ private Entity getEntityForID(UUID id) {
public void runUpdate() {
timeSinceAttack += SentinelPlugin.instance.tickRate;
timeSinceHeal += SentinelPlugin.instance.tickRate;
if (getLivingEntity().getLocation().getY() <= 0) {
getLivingEntity().damage(1);
if (!npc.isSpawned()) {
return;
}
}
if (healRate > 0 && timeSinceHeal > healRate && getLivingEntity().getHealth() < health) {
getLivingEntity().setHealth(Math.min(getLivingEntity().getHealth() + 1.0, health));
timeSinceHeal = 0;

0 comments on commit 5673c10

Please sign in to comment.
You can’t perform that action at this time.