mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-31 00:20:44 +01:00
SPIGOT-7949: Registering a new scoreboard objective with an empty display name throws a NPE
By: md_5 <git@md-5.net>
This commit is contained in:
parent
b9a4bb1cd1
commit
30af9c34dd
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
|
|||
Preconditions.checkArgument(name.length() <= Short.MAX_VALUE, "The name '%s' is longer than the limit of 32767 characters (%s)", name, name.length());
|
||||
Preconditions.checkArgument(board.getObjective(name) == null, "An objective of name '%s' already exists", name);
|
||||
|
||||
ScoreboardObjective objective = board.addObjective(name, ((CraftCriteria) criteria).criteria, CraftChatMessage.fromStringOrNull(displayName), CraftScoreboardTranslations.fromBukkitRender(renderType), true, null);
|
||||
ScoreboardObjective objective = board.addObjective(name, ((CraftCriteria) criteria).criteria, CraftChatMessage.fromStringOrEmpty(displayName), CraftScoreboardTranslations.fromBukkitRender(renderType), true, null);
|
||||
return new CraftObjective(this, objective);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue