made fixguicommand respect autostart

This commit is contained in:
Bella 2020-03-24 23:06:27 -04:00
parent 8ab772584d
commit 44bede1e9f
No known key found for this signature in database
GPG Key ID: 815562EA23BFE344
2 changed files with 10 additions and 1 deletions

View File

@ -17,11 +17,13 @@ public class FixGuiCommand extends Command {
@Override
public void call(String[] args) {
FixGui fixGui = (FixGui) ModuleManager.getModuleByName("Hidden:FixGui");
if (fixGui.isEnabled()) {
if (fixGui.isEnabled() && fixGui.shouldAutoEnable.getValue()) {
fixGui.shouldAutoEnable.setValue(false);
fixGui.disable();
Command.sendChatMessage("[" + getLabel() + "] Disabled");
}
else {
fixGui.shouldAutoEnable.setValue(true);
fixGui.enable();
Command.sendChatMessage("[" + getLabel() + "] Enabled");
}

View File

@ -1,11 +1,18 @@
package me.zeroeightsix.kami.module.modules.hidden;
import me.zeroeightsix.kami.module.Module;
import me.zeroeightsix.kami.setting.Setting;
import me.zeroeightsix.kami.setting.Settings;
import static me.zeroeightsix.kami.util.GuiFrameUtil.fixFrames;
/**
* @author S-B99
* @see me.zeroeightsix.kami.command.commands.FixGuiCommand
*/
@Module.Info(name = "Hidden:FixGui", category = Module.Category.HIDDEN, showOnArray = Module.ShowOnArray.OFF, description = "Moves GUI elements back on screen")
public class FixGui extends Module {
public Setting<Boolean> shouldAutoEnable = register(Settings.b("Enable", true));
public void onUpdate() {
fixFrames(mc);
}