Skip to content

Commit 25e7e51

Browse files
Wide-CatMukjepScarlet
authored andcommitted
Make .reset gui reset the entire GUI config
Now if you set the gui scale to 15 or whatever run this command to fix it
1 parent af64585 commit 25e7e51

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

src/main/java/meteordevelopment/meteorclient/commands/commands/ResetCommand.java

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,36 @@ public ResetCommand() {
2525
@Override
2626
public void build(LiteralArgumentBuilder<CommandSource> builder) {
2727
builder.then(literal("settings")
28-
.then(argument("module", ModuleArgumentType.create()).executes(context -> {
29-
Module module = context.getArgument("module", Module.class);
30-
module.settings.forEach(group -> group.forEach(Setting::reset));
31-
module.info("Reset all settings.");
32-
return SINGLE_SUCCESS;
33-
}))
34-
.then(literal("all").executes(context -> {
35-
Modules.get().getAll().forEach(module -> module.settings.forEach(group -> group.forEach(Setting::reset)));
36-
ChatUtils.infoPrefix("Modules", "Reset all module settings");
37-
return SINGLE_SUCCESS;
38-
}))
28+
.then(argument("module", ModuleArgumentType.create()).executes(context -> {
29+
Module module = context.getArgument("module", Module.class);
30+
module.settings.forEach(group -> group.forEach(Setting::reset));
31+
module.info("Reset all settings.");
32+
return SINGLE_SUCCESS;
33+
}))
34+
.then(literal("all").executes(context -> {
35+
Modules.get().getAll().forEach(module -> module.settings.forEach(group -> group.forEach(Setting::reset)));
36+
ChatUtils.infoPrefix("Modules", "Reset all module settings");
37+
return SINGLE_SUCCESS;
38+
}))
3939
).then(literal("gui").executes(context -> {
4040
GuiThemes.get().clearWindowConfigs();
41-
ChatUtils.info("Reset GUI positioning.");
41+
GuiThemes.get().settings.reset();
42+
ChatUtils.info("Reset all GUI settings.");
4243
return SINGLE_SUCCESS;
4344
})).then(literal("bind")
44-
.then(argument("module", ModuleArgumentType.create()).executes(context -> {
45-
Module module = context.getArgument("module", Module.class);
45+
.then(argument("module", ModuleArgumentType.create()).executes(context -> {
46+
Module module = context.getArgument("module", Module.class);
4647

47-
module.keybind.reset();
48-
module.info("Reset bind.");
48+
module.keybind.reset();
49+
module.info("Reset bind.");
4950

50-
return SINGLE_SUCCESS;
51-
}))
52-
.then(literal("all").executes(context -> {
53-
Modules.get().getAll().forEach(module -> module.keybind.reset());
54-
ChatUtils.infoPrefix("Modules", "Reset all binds.");
55-
return SINGLE_SUCCESS;
56-
}))
51+
return SINGLE_SUCCESS;
52+
}))
53+
.then(literal("all").executes(context -> {
54+
Modules.get().getAll().forEach(module -> module.keybind.reset());
55+
ChatUtils.infoPrefix("Modules", "Reset all binds.");
56+
return SINGLE_SUCCESS;
57+
}))
5758
).then(literal("hud").executes(context -> {
5859
Hud.get().resetToDefaultElements();
5960
ChatUtils.infoPrefix("HUD", "Reset all elements.");

0 commit comments

Comments
 (0)