Archiviert
13
0

Apply strict limits on the length of sign text

Dieser Commit ist enthalten in:
Thinkofdeath 2015-06-12 10:23:05 +01:00
Ursprung a2d26409f7
Commit 5d84673655

Datei anzeigen

@ -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) {