13
0
geforkt von Mirrors/Paper

Cap Objective Score Length

Adds a check for Score arguments that would crash the client

By: hauno <imhauno@gmail.com>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2019-01-05 16:21:07 +11:00
Ursprung b05a252b02
Commit cf0f429119

Datei anzeigen

@ -110,6 +110,7 @@ final class CraftObjective extends CraftScoreboardComponent implements Objective
public Score getScore(String entry) throws IllegalArgumentException, IllegalStateException {
Validate.notNull(entry, "Entry cannot be null");
Validate.isTrue(entry.length() <= 40, "Score '" + entry + "' is longer than the limit of 40 characters");
CraftScoreboard scoreboard = checkState();
return new CraftScore(this, entry);