mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 19:49:35 +01:00
SPIGOT-4112: scoreboard display names are not nullable
By: md_5 <git@md-5.net>
This commit is contained in:
parent
2e7d945edc
commit
f4d1912ded
2 changed files with 2 additions and 2 deletions
|
@ -42,7 +42,7 @@ final class CraftObjective extends CraftScoreboardComponent implements Objective
|
|||
Validate.isTrue(displayName.length() <= 128, "Display name '" + displayName + "' is longer than the limit of 128 characters");
|
||||
CraftScoreboard scoreboard = checkState();
|
||||
|
||||
objective.setDisplayName(CraftChatMessage.fromStringOrNull(displayName));
|
||||
objective.setDisplayName(CraftChatMessage.fromString(displayName)[0]); // SPIGOT-4112: not nullable
|
||||
}
|
||||
|
||||
public String getCriteria() throws IllegalStateException {
|
||||
|
|
|
@ -41,7 +41,7 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
|
|||
Validate.isTrue(displayName.length() <= 128, "Display name '" + displayName + "' is longer than the limit of 128 characters");
|
||||
CraftScoreboard scoreboard = checkState();
|
||||
|
||||
team.setDisplayName(CraftChatMessage.fromStringOrNull(displayName));
|
||||
team.setDisplayName(CraftChatMessage.fromString(displayName)[0]); // SPIGOT-4112: not nullable
|
||||
}
|
||||
|
||||
public String getPrefix() throws IllegalStateException {
|
||||
|
|
Loading…
Reference in a new issue