diff --git a/src/main/java/spigey/asteroide/AsteroideAddon.java b/src/main/java/spigey/asteroide/AsteroideAddon.java index 32afb17..ddcd331 100644 --- a/src/main/java/spigey/asteroide/AsteroideAddon.java +++ b/src/main/java/spigey/asteroide/AsteroideAddon.java @@ -49,7 +49,7 @@ public void onInitialize() { addModule(new InvCleanerModule()); addModule(new BorderNoclipModule()); addModule(new WordFilterModule()); - addModule(new OpNotifierModule()); + addModule(new PacketLoggerModule()); addModule(new VersionSpoofModule()); // Commands diff --git a/src/main/java/spigey/asteroide/modules/OpNotifierModule.java b/src/main/java/spigey/asteroide/modules/PacketLoggerModule.java similarity index 78% rename from src/main/java/spigey/asteroide/modules/OpNotifierModule.java rename to src/main/java/spigey/asteroide/modules/PacketLoggerModule.java index e2a93b2..4515fa1 100644 --- a/src/main/java/spigey/asteroide/modules/OpNotifierModule.java +++ b/src/main/java/spigey/asteroide/modules/PacketLoggerModule.java @@ -6,19 +6,18 @@ import meteordevelopment.meteorclient.settings.SettingGroup; import meteordevelopment.meteorclient.systems.modules.Module; import meteordevelopment.meteorclient.utils.network.PacketUtils; +import meteordevelopment.meteorclient.utils.player.ChatUtils; import meteordevelopment.orbit.EventHandler; import meteordevelopment.orbit.EventPriority; import net.minecraft.network.packet.Packet; -import net.minecraft.network.packet.c2s.login.LoginHelloC2SPacket; +import net.minecraft.text.Text; import spigey.asteroide.AsteroideAddon; import java.util.Set; -import static spigey.asteroide.util.getPermissionLevel; - -public class OpNotifierModule extends Module { - public OpNotifierModule() { - super(AsteroideAddon.CATEGORY, "packet-logger", "Logs packets"); +public class PacketLoggerModule extends Module { + public PacketLoggerModule() { + super(AsteroideAddon.CATEGORY, "packet-logger", "Logs sent/received packets"); } private final SettingGroup sgGeneral = settings.getDefaultGroup(); @@ -38,12 +37,12 @@ public OpNotifierModule() { @EventHandler(priority = EventPriority.HIGHEST + 1) private void onReceivePacket(PacketEvent.Receive event) { - if (s2cPackets.get().contains(event.packet.getClass())) event.cancel(); + if (s2cPackets.get().contains(event.packet.getClass())) ChatUtils.sendMsg(Text.of("§7" + event.packet.getClass().getSimpleName() + " was received!")); } @EventHandler(priority = EventPriority.HIGHEST + 1) private void onSendPacket(PacketEvent.Send event) { - if (c2sPackets.get().contains(event.packet.getClass())) event.cancel(); + if (c2sPackets.get().contains(event.packet.getClass())) ChatUtils.sendMsg(Text.of("§7" + event.packet.getClass().getSimpleName() + " was sent!")); } } diff --git a/src/main/java/spigey/asteroide/modules/VersionSpoofModule.java b/src/main/java/spigey/asteroide/modules/VersionSpoofModule.java index 4240b80..8984511 100644 --- a/src/main/java/spigey/asteroide/modules/VersionSpoofModule.java +++ b/src/main/java/spigey/asteroide/modules/VersionSpoofModule.java @@ -6,11 +6,11 @@ public class VersionSpoofModule extends Module { public VersionSpoofModule() { - super(AsteroideAddon.CATEGORY, "version-spoof", "Spoofs your minecraft version"); + super(AsteroideAddon.CATEGORY, "version-spoof", "Spoofs your minecraft version. In development."); } SettingGroup sgGeneral = settings.getDefaultGroup(); public Setting spoofedVersion = sgGeneral.add(new IntSetting.Builder() - .name("spoofed-version") + .name("spoofed-protocol-version") .description("The spoofed protocol version that will be sent to the server.") .defaultValue(671) .build()