mirror of
https://github.com/YouHaveTrouble/NotJustNameplates.git
synced 2026-05-12 06:26:58 +00:00
hide nameplates on invisible players
This commit is contained in:
@@ -13,6 +13,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.TextDisplay;
|
||||
import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
import org.bukkit.persistence.PersistentDataType;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
import org.bukkit.util.Transformation;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.joml.AxisAngle4f;
|
||||
@@ -142,6 +143,10 @@ public class Nameplate {
|
||||
remove();
|
||||
return;
|
||||
}
|
||||
if (player.hasPotionEffect(PotionEffectType.INVISIBILITY)) {
|
||||
remove();
|
||||
return;
|
||||
}
|
||||
|
||||
createDisplayEntity();
|
||||
if (textDisplay == null || textDisplay.isDead()) return;
|
||||
|
||||
Reference in New Issue
Block a user