mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-01-18 08:52:07 +01:00
!Hopefully fixed heal holos
This commit is contained in:
parent
38caf2e5c5
commit
fb1d1d1537
@ -4,6 +4,7 @@ import java.util.Random;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.attribute.Attribute;
|
||||
import org.bukkit.entity.ArmorStand;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
@ -49,7 +50,8 @@ public abstract class HologramSupport {
|
||||
public void a(EntityRegainHealthEvent event) {
|
||||
|
||||
Entity entity = event.getEntity();
|
||||
if (!(entity instanceof LivingEntity) || event.getAmount() <= 0)
|
||||
if (!(entity instanceof LivingEntity) || event.getAmount() <= 0
|
||||
|| ((LivingEntity) entity).getHealth() >= ((LivingEntity) entity).getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue())
|
||||
return;
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user