diff options
author | md_5 <git@md-5.net> | 2018-07-23 11:46:23 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-07-23 11:46:23 +1000 |
commit | 155b17305b87f11e8e7b7fd247c68c73759cf97f (patch) | |
tree | bd49ba1e71aaafa04f7ab6fdfc503783edb632b2 /src/main/java/org | |
parent | d4297cbe2d76f6dcd58f00d60de2fd312dedb762 (diff) | |
download | craftbukkit-155b17305b87f11e8e7b7fd247c68c73759cf97f.tar craftbukkit-155b17305b87f11e8e7b7fd247c68c73759cf97f.tar.gz craftbukkit-155b17305b87f11e8e7b7fd247c68c73759cf97f.tar.lz craftbukkit-155b17305b87f11e8e7b7fd247c68c73759cf97f.tar.xz craftbukkit-155b17305b87f11e8e7b7fd247c68c73759cf97f.zip |
SPIGOT-4112: scoreboard display names are not nullable
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java | 2 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java index 3f8f1754..0ef48af0 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java +++ b/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/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java index c511fa88..7f710e36 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java +++ b/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 { |