make sure the index is within bounds

This commit is contained in:
hqics authored and GitHub committed 2021-01-21 17:30:44 +01:00
1 parent 42ea68e740
commit eb334013ee
1 file changed
+1 -1
@@ -15,7 +15,7 @@ public class ClientPlayerEntity_clientCommandMixin
@Inject(method = "sendChatMessage", at = @At("HEAD")) @Inject(method = "sendChatMessage", at = @At("HEAD"))
private void inspectMessage(String string, CallbackInfo ci) private void inspectMessage(String string, CallbackInfo ci)
{ {
if (string.startsWith("/call")) if (string.startsWith("/call "))
{ {
String command = string.substring(6); String command = string.substring(6);
CarpetClient.sendClientCommand(command); CarpetClient.sendClientCommand(command);