From 5d846736551f3961b5f41aeb8c14a368ea6141bf Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Fri, 12 Jun 2015 10:23:05 +0100 Subject: [PATCH] Apply strict limits on the length of sign text --- nms-patches/TileEntitySign.patch | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nms-patches/TileEntitySign.patch b/nms-patches/TileEntitySign.patch index 0b6fdcfe38..8e0f5cee02 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) {