Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
Cap Objective Score Length
Adds a check for Score arguments that would crash the client
Dieser Commit ist enthalten in:
Ursprung
6e842759cc
Commit
100c3f07e9
@ -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);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren