Skip to content

Commit

Permalink
small updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Spigey committed May 16, 2024
1 parent d279e83 commit c81d767
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/main/java/spigey/asteroide/AsteroideAddon.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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!"));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Integer> 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()
Expand Down

0 comments on commit c81d767

Please sign in to comment.