From 5ad509517903796cb8855b03fd055fb28e4511c1 Mon Sep 17 00:00:00 2001 From: Powie <88817288+Powie69@users.noreply.github.com> Date: Wed, 15 Apr 2026 16:09:03 +0800 Subject: [PATCH 1/4] Logout spot improvements --- .../meteorclient/commands/Commands.java | 1 + .../commands/commands/LogoutCommand.java | 53 +++++++++++++++++++ .../systems/modules/render/LogoutSpots.java | 32 ++++++++--- 3 files changed, 80 insertions(+), 6 deletions(-) create mode 100644 src/main/java/meteordevelopment/meteorclient/commands/commands/LogoutCommand.java diff --git a/src/main/java/meteordevelopment/meteorclient/commands/Commands.java b/src/main/java/meteordevelopment/meteorclient/commands/Commands.java index c80c9054ad..671bfc7617 100644 --- a/src/main/java/meteordevelopment/meteorclient/commands/Commands.java +++ b/src/main/java/meteordevelopment/meteorclient/commands/Commands.java @@ -55,6 +55,7 @@ public static void init() { add(new SpectateCommand()); add(new GamemodeCommand()); add(new SaveMapCommand()); + add(new LogoutCommand()); add(new MacroCommand()); add(new ModulesCommand()); add(new BindsCommand()); diff --git a/src/main/java/meteordevelopment/meteorclient/commands/commands/LogoutCommand.java b/src/main/java/meteordevelopment/meteorclient/commands/commands/LogoutCommand.java new file mode 100644 index 0000000000..a0ce3c9f92 --- /dev/null +++ b/src/main/java/meteordevelopment/meteorclient/commands/commands/LogoutCommand.java @@ -0,0 +1,53 @@ +/* + * This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client). + * Copyright (c) Meteor Development. + */ + +package meteordevelopment.meteorclient.commands.commands; + +import com.mojang.brigadier.arguments.StringArgumentType; +import com.mojang.brigadier.builder.LiteralArgumentBuilder; +import meteordevelopment.meteorclient.commands.Command; +import meteordevelopment.meteorclient.systems.modules.Modules; +import meteordevelopment.meteorclient.systems.modules.render.LogoutSpots; +import meteordevelopment.meteorclient.utils.player.ChatUtils; +import net.minecraft.command.CommandSource; + +public class LogoutCommand extends Command { + public LogoutCommand() { + super("logout-spots", "Manage logout spots - clear all spots or remove specific players", "logout"); + } + + @Override + public void build(LiteralArgumentBuilder builder) { + builder.then(literal("clear") + .executes(context -> { + LogoutSpots logoutSpots = Modules.get().get(LogoutSpots.class); + logoutSpots.clearLogoutSpots(); + + ChatUtils.info("Cleared all logout spots"); + return SINGLE_SUCCESS; + }) + ); + + builder.then(literal("remove") + .then(argument("name", StringArgumentType.word()) + .executes(context -> { + String playerName = StringArgumentType.getString(context, "name"); + LogoutSpots logoutSpots = Modules.get().get(LogoutSpots.class); + + boolean removed = logoutSpots.removeLogoutSpot(playerName); + + if (removed) { + ChatUtils.info("Removed logout spot for player: " + playerName); + } else { + ChatUtils.error("No logout spot found for player: " + playerName); + } + return SINGLE_SUCCESS; + }) + ) + ); + + + } +} diff --git a/src/main/java/meteordevelopment/meteorclient/systems/modules/render/LogoutSpots.java b/src/main/java/meteordevelopment/meteorclient/systems/modules/render/LogoutSpots.java index cdfaa7adda..74d2f4dea5 100644 --- a/src/main/java/meteordevelopment/meteorclient/systems/modules/render/LogoutSpots.java +++ b/src/main/java/meteordevelopment/meteorclient/systems/modules/render/LogoutSpots.java @@ -9,6 +9,10 @@ import meteordevelopment.meteorclient.events.render.Render2DEvent; import meteordevelopment.meteorclient.events.render.Render3DEvent; import meteordevelopment.meteorclient.events.world.TickEvent; +import meteordevelopment.meteorclient.gui.GuiTheme; +import meteordevelopment.meteorclient.gui.widgets.WWidget; +import meteordevelopment.meteorclient.gui.widgets.containers.WVerticalList; +import meteordevelopment.meteorclient.gui.widgets.pressable.WButton; import meteordevelopment.meteorclient.renderer.Renderer2D; import meteordevelopment.meteorclient.renderer.ShapeMode; import meteordevelopment.meteorclient.renderer.text.TextRenderer; @@ -105,6 +109,18 @@ public LogoutSpots() { lineColor.onChanged(); } + @Override + public WWidget getWidget(GuiTheme theme) { + WVerticalList list = theme.verticalList(); + + // Button to Clear Interacted Blocks + WButton clear = list.add(theme.button("Clear Logout Spots")).expandX().widget(); + + clear.action = this::clearLogoutSpots; + + return list; + } + @Override public void onActivate() { lastPlayerList.addAll(mc.getNetworkHandler().getPlayerList()); @@ -114,12 +130,7 @@ public void onActivate() { lastDimension = mc.world.getDimension(); } - @Override - public void onDeactivate() { - players.clear(); - lastPlayerList.clear(); - } - + private void updateLastPlayers() { lastPlayers.clear(); for (Entity entity : mc.world.getEntities()) { @@ -195,6 +206,15 @@ public String getInfoString() { return Integer.toString(players.size()); } + public void clearLogoutSpots() { + players.clear(); + lastPlayerList.clear(); + } + + public boolean removeLogoutSpot(String playerName) { + return players.removeIf(entry -> entry.name.equalsIgnoreCase(playerName)); + } + private static final Vector3d pos = new Vector3d(); private class Entry { From d88ff26e7cf2706657ad2895a2d9247140ecdf78 Mon Sep 17 00:00:00 2001 From: Powie <88817288+Powie69@users.noreply.github.com> Date: Wed, 15 Apr 2026 16:23:02 +0800 Subject: [PATCH 2/4] nah uh I didnt ctrl c ctrl v that --- .../meteorclient/systems/modules/render/LogoutSpots.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/meteordevelopment/meteorclient/systems/modules/render/LogoutSpots.java b/src/main/java/meteordevelopment/meteorclient/systems/modules/render/LogoutSpots.java index 74d2f4dea5..f4197ce823 100644 --- a/src/main/java/meteordevelopment/meteorclient/systems/modules/render/LogoutSpots.java +++ b/src/main/java/meteordevelopment/meteorclient/systems/modules/render/LogoutSpots.java @@ -113,7 +113,6 @@ public LogoutSpots() { public WWidget getWidget(GuiTheme theme) { WVerticalList list = theme.verticalList(); - // Button to Clear Interacted Blocks WButton clear = list.add(theme.button("Clear Logout Spots")).expandX().widget(); clear.action = this::clearLogoutSpots; From b21535275fafbe5fa4b906eed87510de51bd8f75 Mon Sep 17 00:00:00 2001 From: Powie <88817288+Powie69@users.noreply.github.com> Date: Thu, 30 Apr 2026 11:51:45 +0800 Subject: [PATCH 3/4] add option to clear spots on module deactivate --- .../meteorclient/commands/commands/LogoutCommand.java | 11 +++++------ .../systems/modules/render/LogoutSpots.java | 11 +++++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/main/java/meteordevelopment/meteorclient/commands/commands/LogoutCommand.java b/src/main/java/meteordevelopment/meteorclient/commands/commands/LogoutCommand.java index a0ce3c9f92..d8ae97ffeb 100644 --- a/src/main/java/meteordevelopment/meteorclient/commands/commands/LogoutCommand.java +++ b/src/main/java/meteordevelopment/meteorclient/commands/commands/LogoutCommand.java @@ -11,7 +11,7 @@ import meteordevelopment.meteorclient.systems.modules.Modules; import meteordevelopment.meteorclient.systems.modules.render.LogoutSpots; import meteordevelopment.meteorclient.utils.player.ChatUtils; -import net.minecraft.command.CommandSource; +import net.minecraft.client.multiplayer.ClientSuggestionProvider; public class LogoutCommand extends Command { public LogoutCommand() { @@ -19,10 +19,11 @@ public LogoutCommand() { } @Override - public void build(LiteralArgumentBuilder builder) { + public void build(LiteralArgumentBuilder builder) { + LogoutSpots logoutSpots = Modules.get().get(LogoutSpots.class); + builder.then(literal("clear") - .executes(context -> { - LogoutSpots logoutSpots = Modules.get().get(LogoutSpots.class); + .executes(_ -> { logoutSpots.clearLogoutSpots(); ChatUtils.info("Cleared all logout spots"); @@ -34,8 +35,6 @@ public void build(LiteralArgumentBuilder builder) { .then(argument("name", StringArgumentType.word()) .executes(context -> { String playerName = StringArgumentType.getString(context, "name"); - LogoutSpots logoutSpots = Modules.get().get(LogoutSpots.class); - boolean removed = logoutSpots.removeLogoutSpot(playerName); if (removed) { diff --git a/src/main/java/meteordevelopment/meteorclient/systems/modules/render/LogoutSpots.java b/src/main/java/meteordevelopment/meteorclient/systems/modules/render/LogoutSpots.java index 4d0d18bdb5..28339de7d3 100644 --- a/src/main/java/meteordevelopment/meteorclient/systems/modules/render/LogoutSpots.java +++ b/src/main/java/meteordevelopment/meteorclient/systems/modules/render/LogoutSpots.java @@ -44,6 +44,13 @@ public class LogoutSpots extends Module { // General + private final Setting clearOnDeactivate = sgGeneral.add(new BoolSetting.Builder() + .name("clear-on-deactivate") + .description("Clears all logout spot when module is deactivated.") + .defaultValue(false) + .build() + ); + private final Setting scale = sgGeneral.add(new DoubleSetting.Builder() .name("scale") .description("The scale.") @@ -129,6 +136,10 @@ public void onActivate() { lastDimension = mc.level.dimensionType(); } + @Override + public void onDeactivate() { + if (clearOnDeactivate.get()) clearLogoutSpots(); + } private void updateLastPlayers() { lastPlayers.clear(); From f62527d73b19fe6aa42332f71be9935c60488ca9 Mon Sep 17 00:00:00 2001 From: Powie <88817288+Powie69@users.noreply.github.com> Date: Thu, 30 Apr 2026 11:55:02 +0800 Subject: [PATCH 4/4] Might as well --- .../meteorclient/commands/Commands.java | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/main/java/meteordevelopment/meteorclient/commands/Commands.java b/src/main/java/meteordevelopment/meteorclient/commands/Commands.java index 9ac455890c..506b122401 100644 --- a/src/main/java/meteordevelopment/meteorclient/commands/Commands.java +++ b/src/main/java/meteordevelopment/meteorclient/commands/Commands.java @@ -29,46 +29,46 @@ public class Commands { @PostInit(dependencies = PathManagers.class) public static void init() { - add(new VClipCommand()); - add(new HClipCommand()); - add(new DismountCommand()); - add(new DisconnectCommand()); + add(new BindCommand()); + add(new BindsCommand()); + add(new CommandsCommand()); add(new DamageCommand()); + add(new DisconnectCommand()); + add(new DismountCommand()); add(new DropCommand()); add(new EnchantCommand()); + add(new EnderChestCommand()); add(new FakePlayerCommand()); + add(new FovCommand()); add(new FriendsCommand()); - add(new CommandsCommand()); + add(new GamemodeCommand()); + add(new GiveCommand()); + add(new HClipCommand()); + add(new HelpCommand()); + add(new InputCommand()); add(new InventoryCommand()); + add(new LocateCommand()); + add(new LogoutCommand()); + add(new MacroCommand()); + add(new ModulesCommand()); + add(new NameHistoryCommand()); add(new NbtCommand()); add(new NotebotCommand()); add(new PeekCommand()); - add(new EnderChestCommand()); add(new ProfilesCommand()); add(new ReloadCommand()); add(new ResetCommand()); + add(new RotationCommand()); + add(new SaveMapCommand()); add(new SayCommand()); add(new ServerCommand()); - add(new SwarmCommand()); - add(new ToggleCommand()); add(new SettingCommand()); add(new SpectateCommand()); - add(new GamemodeCommand()); - add(new SaveMapCommand()); - add(new LogoutCommand()); - add(new MacroCommand()); - add(new ModulesCommand()); - add(new BindsCommand()); - add(new GiveCommand()); - add(new NameHistoryCommand()); - add(new BindCommand()); - add(new FovCommand()); - add(new RotationCommand()); - add(new WaypointCommand()); - add(new InputCommand()); + add(new SwarmCommand()); + add(new ToggleCommand()); + add(new VClipCommand()); add(new WaspCommand()); - add(new LocateCommand()); - add(new HelpCommand()); + add(new WaypointCommand()); COMMANDS.sort(Comparator.comparing(Command::getName));