From b690edd27375f0251c4f01f8c9aa8d65ec005a6d Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sun, 9 Jul 2023 11:55:02 -0700 Subject: [PATCH] API for an entity's scoreboard name Was obtainable through different methods, but you had to use different methods depending on the implementation of Entity you were working with. --- .../java/org/bukkit/craftbukkit/entity/CraftEntity.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index d078f21456..0278cd156e 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -1259,4 +1259,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return !this.getHandle().level().noCollision(this.getHandle(), aabb); } // Paper end - Collision API + + // Paper start - entity scoreboard name + @Override + public String getScoreboardEntryName() { + return this.getHandle().getScoreboardName(); + } + // Paper end - entity scoreboard name }