fixed mixin not loading

This commit is contained in:
Unknown
2019-12-10 19:44:01 -05:00
parent 0a4694d00b
commit 9cccf12924
@@ -15,12 +15,14 @@ public abstract class ClientPlayerEntityMixin {
@Inject(method = "sendChatMessage", at = @At("HEAD"), cancellable = true)
private void onSendChatMessage(String message, CallbackInfo ci) {
System.out.println("MESSAGE: " + message);
if(message.startsWith("/")) {
StringReader reader = new StringReader(message);
reader.skip();
//Removing this kill the mixin. Son of a bitch.
int cursor = reader.getCursor();
reader.setCursor(cursor);
if(ClientCommands.isClientSideCommand(message.substring(1).split(Pattern.quote(" ")))) {
ClientCommands.executeCommand(reader);
ci.cancel();