diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java index 3f8f1754a0..0ef48af0d3 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java @@ -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 { diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java index c511fa8826..7f710e36ba 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java @@ -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 {