Closed keirman1 closed 2 years ago
Seems like something is wrong with your mixin. Unless that Category
class extends or implements a PanelStudio class, this is not a PanelStudio issue.
This is my category `package me.asdacashier.asdaware.module;
import java.awt.Color; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Random; import java.util.stream.Stream;
import me.asdacashier.asdaware.setting.BooleanSetting; import me.asdacashier.asdaware.setting.ColorSetting; import me.asdacashier.asdaware.setting.DoubleSetting; import me.asdacashier.asdaware.setting.IntegerSetting; import me.asdacashier.asdaware.setting.Setting; import me.asdacashier.asdaware.setting.StringSetting; import com.lukflug.panelstudio.setting.ICategory; import com.lukflug.panelstudio.setting.IClient; import com.lukflug.panelstudio.setting.IModule;
public enum Category implements ICategory {
COMBAT("Combat"),EXPLOITS("Exploits"),HUD("HUD"),MISCELLANEOUS("Misc"),MOVEMENT("Movement"),RENDER("Render"),WORLD("World");
public final String displayName;
public final List
Category(String displayName) {
this.displayName=displayName;
}
public static void init() {
}
@Override
public String getDisplayName() {
return displayName;
}
@Override
public Stream<IModule> getModules() {
return modules.stream().map(module->module);
}
public static IClient getClient() {
return new IClient() {
@Override
public Stream<ICategory> getCategories() {
return Arrays.stream(Category.values());
}
};
}
}
`
How does your Mixin look like?
i fixed it all but how do i check if a module is toggled in a module class?
The IModule
class has a isEnabled
method that returns an IToggleable
indicating whether the module is enabled. If it is null
, the module has no on/off state. Otherwise you can query the state via module.isEnabled().isOn()
.
also how do i have something that always updates in a module
I don't exactly understand what you mean. But any change in the value/name of a setting will be shown immediately.
nvm
ill use alpine
so how would i make a module lets say makes some1 always sprint so always runs mc.player.setSprinting(true)
how would i do this
PanelStudio is for rendering the GUI, not for the actual functionality of modules (except ofc HUD modules)
oh ok