mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-08-20 05:14:20 +00:00
14 lines
545 B
Diff
14 lines
545 B
Diff
--- a/net/minecraft/network/chat/IChatFormatted.java
|
|
+++ b/net/minecraft/network/chat/IChatFormatted.java
|
|
@@ -90,6 +90,11 @@
|
|
StringBuilder stringbuilder = new StringBuilder();
|
|
|
|
this.visit((s) -> {
|
|
+ // CraftBukkit start
|
|
+ if (stringbuilder.length() >= Short.MAX_VALUE) {
|
|
+ throw new IllegalArgumentException("Component string exceeded maximum length");
|
|
+ }
|
|
+ // CraftBukkit end
|
|
stringbuilder.append(s);
|
|
return Optional.empty();
|
|
});
|