name-protect module

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

1 implementationPlayer

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 ClientPlayersrc/main/java/meteordevelopment/meteorclient/systems/modules/player/NameProtect.javaJava · 71 lines · 2.1 KB

Hide player names and skins.

Settingsnameskin-protect
NameProtect.javaJava · Minecraft 26.2 · 71 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.player;
7
8
import meteordevelopment.meteorclient.settings.BoolSetting;
9
import meteordevelopment.meteorclient.settings.Setting;
10
import meteordevelopment.meteorclient.settings.SettingGroup;
11
import meteordevelopment.meteorclient.settings.StringSetting;
12
import meteordevelopment.meteorclient.systems.modules.Categories;
13
import meteordevelopment.meteorclient.systems.modules.Module;
14
15
public class NameProtect extends Module {
16
    private final SettingGroup sgGeneral = settings.getDefaultGroup();
17
18
    private final Setting<Boolean> nameProtect = sgGeneral.add(new BoolSetting.Builder()
19
        .name("name-protect")
20
        .description("Hides your name client-side.")
21
        .defaultValue(true)
22
        .build()
23
    );
24
25
    private final Setting<String> name = sgGeneral.add(new StringSetting.Builder()
26
        .name("name")
27
        .description("Name to be replaced with.")
28
        .defaultValue("seasnail")
29
        .visible(nameProtect::get)
30
        .build()
31
    );
32
33
    private final Setting<Boolean> skinProtect = sgGeneral.add(new BoolSetting.Builder()
34
        .name("skin-protect")
35
        .description("Make players become Steves.")
36
        .defaultValue(true)
37
        .build()
38
    );
39
40
    private String username = "If you see this, something is wrong.";
41
42
    public NameProtect() {
43
        super(Categories.Player, "name-protect", "Hide player names and skins.");
44
    }
45
46
    @Override
47
    public void onActivate() {
48
        username = mc.getUser().getName();
49
    }
50
51
    public String replaceName(String string) {
52
        if (string != null && isActive()) {
53
            return string.replace(username, name.get());
54
        }
55
56
        return string;
57
    }
58
59
    public String getName(String original) {
60
        if (!name.get().isEmpty() && isActive()) {
61
            return name.get();
62
        }
63
64
        return original;
65
    }
66
67
    public boolean skinProtect() {
68
        return isActive() && skinProtect.get();
69
    }
70
}
71