mirror of
https://github.com/YouHaveTrouble/NotJustNameplates.git
synced 2026-05-11 22:16:57 +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.entity.TextDisplay;
|
||||||
import org.bukkit.event.entity.CreatureSpawnEvent;
|
import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||||
import org.bukkit.persistence.PersistentDataType;
|
import org.bukkit.persistence.PersistentDataType;
|
||||||
|
import org.bukkit.potion.PotionEffectType;
|
||||||
import org.bukkit.util.Transformation;
|
import org.bukkit.util.Transformation;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.joml.AxisAngle4f;
|
import org.joml.AxisAngle4f;
|
||||||
@@ -142,6 +143,10 @@ public class Nameplate {
|
|||||||
remove();
|
remove();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (player.hasPotionEffect(PotionEffectType.INVISIBILITY)) {
|
||||||
|
remove();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
createDisplayEntity();
|
createDisplayEntity();
|
||||||
if (textDisplay == null || textDisplay.isDead()) return;
|
if (textDisplay == null || textDisplay.isDead()) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user