Skip to content

Commit

Permalink
and failed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Spigey committed Apr 12, 2024
1 parent 5be41d6 commit e0bfbf7
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/main/java/spigey/asteroide/modules/CreativeCrashModule.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package spigey.asteroide.modules;

import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.player.ChatUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.network.packet.s2c.play.GameMessageS2CPacket;
import net.minecraft.text.Text;
import net.minecraft.text.TranslatableTextContent;
import spigey.asteroide.AsteroideAddon;

public class CreativeCrashModule extends Module {
private int checking;

public CreativeCrashModule() {
super(AsteroideAddon.CATEGORY, "Server Fuck", "Crashes the server without using OP. Creative mode required");
}
@EventHandler
private void onReceivePacket(PacketEvent.Receive event) {
if (!(event.packet instanceof GameMessageS2CPacket))
return;
Text message = ((GameMessageS2CPacket)event.packet).content();
if (message.getContent() instanceof TranslatableTextContent) {
String key = ((TranslatableTextContent)message.getContent()).getKey();
if (key.equals("advMode.notEnabled")) {
ChatUtils.info("Command blocks are deactivated");
event.cancel();
} else if (key.equals("advMode.notAllowed") || key.equals("advMode.setCommand.success")) {
ChatUtils.info("Command blocks are activated");
event.cancel();
}
}
}
}


0 comments on commit e0bfbf7

Please sign in to comment.