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:54:54 -07:00
parent c4091d62f4
commit 0d206d5069

View file

@ -1112,4 +1112,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
*/ */
@NotNull io.papermc.paper.threadedregions.scheduler.EntityScheduler getScheduler(); @NotNull io.papermc.paper.threadedregions.scheduler.EntityScheduler getScheduler();
// Paper end - Folia schedulers // Paper end - Folia schedulers
// Paper start - entity scoreboard name
/**
* Gets the string name of the entity used to track it in {@link org.bukkit.scoreboard.Scoreboard Scoreboards}.
*
* @return the scoreboard entry name
* @see org.bukkit.scoreboard.Scoreboard#getScores(String)
* @see org.bukkit.scoreboard.Scoreboard#getEntries()
*/
@NotNull String getScoreboardEntryName();
// Paper end - entity scoreboard name
} }