auto-reconnect module

auto-reconnect: Minecraft 26.3 cheat module, full source for every implementation (1 client: Meteor Client).

1 implementationMisc

Clients with this module

Full module source: 1 implementation

Every implementation below is the complete module file, verbatim. Expand a client to read its code.

Meteor ClientMiscsrc/main/java/meteordevelopment/meteorclient/systems/modules/misc/AutoReconnect.javaJava · 55 lines · 2.1 KB

Automatically reconnects when disconnected from a server.

Settingsdelayhide-buttons
AutoReconnect.javaJava · Minecraft 26.2 · 55 lines · 2.1 KB · complete file, verbatimOriginal ↗
1
/*
2
 * This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client).
3
 * Copyright (c) Meteor Development.
4
 */
5
6
package meteordevelopment.meteorclient.systems.modules.misc;
7
8
import it.unimi.dsi.fastutil.Pair;
9
import it.unimi.dsi.fastutil.objects.ObjectObjectImmutablePair;
10
import meteordevelopment.meteorclient.MeteorClient;
11
import meteordevelopment.meteorclient.events.world.ServerConnectBeginEvent;
12
import meteordevelopment.meteorclient.settings.BoolSetting;
13
import meteordevelopment.meteorclient.settings.DoubleSetting;
14
import meteordevelopment.meteorclient.settings.Setting;
15
import meteordevelopment.meteorclient.settings.SettingGroup;
16
import meteordevelopment.meteorclient.systems.modules.Categories;
17
import meteordevelopment.meteorclient.systems.modules.Module;
18
import meteordevelopment.orbit.EventHandler;
19
import net.minecraft.client.multiplayer.resolver.ServerAddress;
20
import net.minecraft.client.multiplayer.ServerData;
21
22
public class AutoReconnect extends Module {
23
    private final SettingGroup sgGeneral = settings.getDefaultGroup();
24
25
    public final Setting<Double> time = sgGeneral.add(new DoubleSetting.Builder()
26
        .name("delay")
27
        .description("The amount of seconds to wait before reconnecting to the server.")
28
        .defaultValue(3.5)
29
        .min(0)
30
        .decimalPlaces(1)
31
        .build()
32
    );
33
34
    public final Setting<Boolean> button = sgGeneral.add(new BoolSetting.Builder()
35
        .name("hide-buttons")
36
        .description("Will hide the buttons related to Auto Reconnect.")
37
        .defaultValue(false)
38
        .build()
39
    );
40
41
    public Pair<ServerAddress, ServerData> lastServerConnection;
42
43
    public AutoReconnect() {
44
        super(Categories.Misc, "auto-reconnect", "Automatically reconnects when disconnected from a server.");
45
        MeteorClient.EVENT_BUS.subscribe(new StaticListener());
46
    }
47
48
    private class StaticListener {
49
        @EventHandler
50
        private void onGameJoined(ServerConnectBeginEvent event) {
51
            lastServerConnection = new ObjectObjectImmutablePair<>(event.address, event.info);
52
        }
53
    }
54
}
55