3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 12:30:06 +01:00

SPIGOT-4017: Increase Team related length limits

Dieser Commit ist enthalten in:
md_5 2018-07-16 19:15:26 +10:00
Ursprung e563bc00db
Commit 926ea10459

Datei anzeigen

@ -38,7 +38,7 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
public void setDisplayName(String displayName) throws IllegalStateException { public void setDisplayName(String displayName) throws IllegalStateException {
Validate.notNull(displayName, "Display name cannot be null"); Validate.notNull(displayName, "Display name cannot be null");
Validate.isTrue(displayName.length() <= 32, "Display name '" + displayName + "' is longer than the limit of 32 characters"); Validate.isTrue(displayName.length() <= 64, "Display name '" + displayName + "' is longer than the limit of 64 characters");
CraftScoreboard scoreboard = checkState(); CraftScoreboard scoreboard = checkState();
team.setDisplayName(displayName); team.setDisplayName(displayName);
@ -52,7 +52,7 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
public void setPrefix(String prefix) throws IllegalStateException, IllegalArgumentException { public void setPrefix(String prefix) throws IllegalStateException, IllegalArgumentException {
Validate.notNull(prefix, "Prefix cannot be null"); Validate.notNull(prefix, "Prefix cannot be null");
Validate.isTrue(prefix.length() <= 16, "Prefix '" + prefix + "' is longer than the limit of 16 characters"); Validate.isTrue(prefix.length() <= 32, "Prefix '" + prefix + "' is longer than the limit of 32 characters");
CraftScoreboard scoreboard = checkState(); CraftScoreboard scoreboard = checkState();
team.a(CraftChatMessage.fromStringOrNull(prefix)); team.a(CraftChatMessage.fromStringOrNull(prefix));
@ -66,7 +66,7 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
public void setSuffix(String suffix) throws IllegalStateException, IllegalArgumentException { public void setSuffix(String suffix) throws IllegalStateException, IllegalArgumentException {
Validate.notNull(suffix, "Suffix cannot be null"); Validate.notNull(suffix, "Suffix cannot be null");
Validate.isTrue(suffix.length() <= 16, "Suffix '" + suffix + "' is longer than the limit of 16 characters"); Validate.isTrue(suffix.length() <= 32, "Suffix '" + suffix + "' is longer than the limit of 32 characters");
CraftScoreboard scoreboard = checkState(); CraftScoreboard scoreboard = checkState();
team.b(CraftChatMessage.fromStringOrNull(suffix)); team.b(CraftChatMessage.fromStringOrNull(suffix));