mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-08-21 05:44:33 +00:00
15 lines
545 B
Diff
15 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();
|
||
|
});
|