Skip to content

Commit a4febaf

Browse files
Fix: Chat doesn't close if eval parses a message
1 parent 67c3b41 commit a4febaf

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

common/src/main/java/com/reclipse/eval/mixin/MixinChatScreen.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import net.minecraft.ChatFormatting;
66
import net.minecraft.client.Minecraft;
77
import net.minecraft.client.gui.screens.ChatScreen;
8+
import net.minecraft.client.gui.screens.Screen;
89
import net.minecraft.network.chat.Component;
910
import org.spongepowered.asm.mixin.Mixin;
1011
import org.spongepowered.asm.mixin.injection.At;
@@ -42,6 +43,7 @@ private void onChatInput(String message, boolean addToHistory, CallbackInfoRetur
4243
}
4344

4445
cir.setReturnValue(true);
46+
client.setScreen((Screen) null);
4547
cir.cancel();
4648
return;
4749
}
@@ -59,6 +61,7 @@ private void onChatInput(String message, boolean addToHistory, CallbackInfoRetur
5961
}
6062

6163
cir.setReturnValue(false);
64+
client.setScreen((Screen) null);
6265
cir.cancel();
6366
}
6467
}

0 commit comments

Comments
 (0)