From 06e0085b98fc2f2e5708dea97c4c5af4fed13ff3 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sun, 6 Nov 2016 12:13:44 +1100 Subject: [PATCH] Implement Entity Scoreboard Tags By: Senmori --- .../main/java/org/bukkit/entity/Entity.java | 28 +++++++++++++++++++ 1 file changed, 28 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 779da358c9..38d665a320 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Entity.java +++ b/paper-api/src/main/java/org/bukkit/entity/Entity.java @@ -9,6 +9,7 @@ import org.bukkit.metadata.Metadatable; import org.bukkit.util.Vector; import java.util.List; +import java.util.Set; import java.util.UUID; import org.bukkit.command.CommandSender; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; @@ -417,4 +418,31 @@ public interface Entity extends Metadatable, CommandSender { * @param cooldown portal cooldown ticks */ void setPortalCooldown(int cooldown); + + /** + * Returns a set of tags for this entity. + *
+ * Entities can have no more than 1024 tags. + * + * @return a set of tags for this entity + */ + Set getScoreboardTags(); + + /** + * Add a tag to this entity. + *
+ * Entities can have no more than 1024 tags. + * + * @param tag the tag to add + * @return true if the tag was successfully added + */ + boolean addScoreboardTag(String tag); + + /** + * Removes a given tag from this entity. + * + * @param tag the tag to remove + * @return true if the tag was successfully removed + */ + boolean removeScoreboardTag(String tag); }