summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2015-06-12 10:23:05 +0100
committerThinkofdeath <thinkofdeath@spigotmc.org>2015-06-12 10:23:05 +0100
commit5d846736551f3961b5f41aeb8c14a368ea6141bf (patch)
tree1ce6055895a22bc626177877479dabec9da96bc5
parenta2d26409f702f712525260ab6eddcfc49cf58d50 (diff)
downloadcraftbukkit-5d846736551f3961b5f41aeb8c14a368ea6141bf.tar
craftbukkit-5d846736551f3961b5f41aeb8c14a368ea6141bf.tar.gz
craftbukkit-5d846736551f3961b5f41aeb8c14a368ea6141bf.tar.lz
craftbukkit-5d846736551f3961b5f41aeb8c14a368ea6141bf.tar.xz
craftbukkit-5d846736551f3961b5f41aeb8c14a368ea6141bf.zip
Apply strict limits on the length of sign text
-rw-r--r--nms-patches/TileEntitySign.patch7
1 files changed, 5 insertions, 2 deletions
diff --git a/nms-patches/TileEntitySign.patch b/nms-patches/TileEntitySign.patch
index 0b6fdcfe..8e0f5cee 100644
--- a/nms-patches/TileEntitySign.patch
+++ b/nms-patches/TileEntitySign.patch
@@ -13,7 +13,7 @@
this.i.b(nbttagcompound);
}
-@@ -65,12 +71,24 @@
+@@ -65,12 +71,27 @@
public void a(CommandObjectiveExecutor.EnumCommandResult commandobjectiveexecutor_enumcommandresult, int i) {}
};
@@ -25,6 +25,9 @@
+
for (int i = 0; i < 4; ++i) {
String s = nbttagcompound.getString("Text" + (i + 1));
++ if (s != null && s.length() > 384) {
++ s = "\"\"";
++ }
try {
IChatBaseComponent ichatbasecomponent = IChatBaseComponent.ChatSerializer.a(s);
@@ -38,7 +41,7 @@
try {
this.lines[i] = ChatComponentUtils.filterForDisplay(icommandlistener, ichatbasecomponent, (Entity) null);
} catch (CommandException commandexception) {
-@@ -155,7 +173,10 @@
+@@ -155,7 +176,10 @@
ChatClickable chatclickable = chatmodifier.h();
if (chatclickable.a() == ChatClickable.EnumClickAction.RUN_COMMAND) {