Update to 1.19

This commit is contained in:
MonkeySaint
2022-06-10 15:37:58 -04:00
committed by Cloudburst
parent f0b189634f
commit f8dd3787d1
35 changed files with 170 additions and 164 deletions

View File

@@ -25,6 +25,7 @@ import meteordevelopment.starscript.Script;
import meteordevelopment.starscript.compiler.Compiler;
import meteordevelopment.starscript.compiler.Parser;
import meteordevelopment.starscript.utils.StarscriptError;
import net.minecraft.text.Text;
public class ChatBot extends Module {
@@ -61,7 +62,8 @@ public class ChatBot extends Module {
private void onMessageRecieve(ReceiveMessageEvent event) {
String msg = event.getMessage().getString();
if (help.get() && msg.endsWith(prefix.get()+"help")) {
mc.getNetworkHandler().sendPacket(new ChatMessageC2SPacket("Avaliable commands: " + String.join(", ", commands.keySet())));
mc.player.sendMessage(Text.of("Avaliable commands: " + String.join(", ", commands.keySet())), false);
// mc.getNetworkHandler().sendPacket(new ChatMessageC2SPacket("Avaliable commands: " + String.join(", ", commands.keySet())), );
return;
}
for (String cmd : commands.keySet()) {