Fixed command exploit with C12

This commit is contained in:
Lex Manos 2015-05-25 16:08:42 -07:00
parent c608e7c04e
commit 9fa51447a2
1 changed files with 12 additions and 0 deletions

View File

@ -152,3 +152,15 @@
}
break;
@@ -1080,7 +1110,10 @@
return;
}
- System.arraycopy(p_147343_1_.func_180768_b(), 0, tileentitysign.field_145915_a, 0, 4);
+ IChatComponent[] lines = p_147343_1_.func_180768_b(); //Forge: Prevent client from directly sending commands
+ for (int x = 0; x < tileentitysign.field_145915_a.length && x < lines.length; x++)
+ tileentitysign.field_145915_a[x] = new ChatComponentText(lines[x].func_150260_c());
+
tileentitysign.func_70296_d();
worldserver.func_175689_h(blockpos);
}