aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/ftbsc/bscv/api/IModule.java2
-rw-r--r--src/main/java/ftbsc/bscv/modules/AbstractModule.java9
2 files changed, 3 insertions, 8 deletions
diff --git a/src/main/java/ftbsc/bscv/api/IModule.java b/src/main/java/ftbsc/bscv/api/IModule.java
index d295023..2b0ea12 100644
--- a/src/main/java/ftbsc/bscv/api/IModule.java
+++ b/src/main/java/ftbsc/bscv/api/IModule.java
@@ -9,7 +9,7 @@ public interface IModule extends ICommand {
ForgeConfigSpec.Builder getConfigBuilder();
default void toggle() {
- if(this.isEnabled())
+ if (this.isEnabled())
this.disable();
else this.enable();
}
diff --git a/src/main/java/ftbsc/bscv/modules/AbstractModule.java b/src/main/java/ftbsc/bscv/modules/AbstractModule.java
index fcf4363..384d593 100644
--- a/src/main/java/ftbsc/bscv/modules/AbstractModule.java
+++ b/src/main/java/ftbsc/bscv/modules/AbstractModule.java
@@ -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()));
}