From 86d3c9caa7d82a155729ca267e843b0ca1510366 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sat, 4 Mar 2023 09:15:46 +1100 Subject: [PATCH] #811: Add API to allow entities to be invisible by default Designed to make creating per-player entities easier By: md_5 --- .../main/java/org/bukkit/entity/Entity.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/Entity.java b/paper-api/src/main/java/org/bukkit/entity/Entity.java index b8b966b0e7..2570b335ca 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Entity.java +++ b/paper-api/src/main/java/org/bukkit/entity/Entity.java @@ -520,6 +520,32 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent */ public boolean isCustomNameVisible(); + /** + * Sets whether or not this entity is visible by default. + * + * If this entity is not visible by default, then + * {@link Player#showEntity(org.bukkit.plugin.Plugin, org.bukkit.entity.Entity)} + * will need to be called before the entity is visible to a given player. + * + * @param visible default visibility status + * @deprecated draft API + */ + @Deprecated + public void setVisibleByDefault(boolean visible); + + /** + * Gets whether or not this entity is visible by default. + * + * If this entity is not visible by default, then + * {@link Player#showEntity(org.bukkit.plugin.Plugin, org.bukkit.entity.Entity)} + * will need to be called before the entity is visible to a given player. + * + * @return default visibility status + * @deprecated draft API + */ + @Deprecated + public boolean isVisibleByDefault(); + /** * Sets whether the entity has a team colored (default: white) glow. *