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.
This commit is contained in:
Jake Potrebic 2023-07-09 11:55:02 -07:00
parent c6e45b313c
commit b690edd273

View File

@ -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
}