fix: re-enable saving state
This commit is contained in:
parent
e42f5245db
commit
82e93b6359
2 changed files with 3 additions and 8 deletions
|
@ -73,15 +73,10 @@ public abstract class AbstractModule implements IModule {
|
|||
protected void onEnabled() {}
|
||||
protected void onDisabled() {}
|
||||
|
||||
public final void toggle() {
|
||||
if (this.enabled.get()) this.disable();
|
||||
else this.enable();
|
||||
}
|
||||
|
||||
public final void enable() {
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
this.enabled.set(true);
|
||||
// this.enabled.save();
|
||||
this.enabled.save();
|
||||
this.onEnabled();
|
||||
log(String.format("%s ON", this.getName()));
|
||||
}
|
||||
|
@ -89,7 +84,7 @@ public abstract class AbstractModule implements IModule {
|
|||
public final void disable() {
|
||||
MinecraftForge.EVENT_BUS.unregister(this);
|
||||
this.enabled.set(false);
|
||||
// this.enabled.save();
|
||||
this.enabled.save();
|
||||
this.onDisabled();
|
||||
log(String.format("%s OFF", this.getName()));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue