feat: log module toggling
This commit is contained in:
parent
2867df0f51
commit
1d152324f6
1 changed files with 4 additions and 1 deletions
|
@ -1,13 +1,14 @@
|
||||||
package co.fantabos.bscv;
|
package co.fantabos.bscv;
|
||||||
|
|
||||||
import com.mojang.brigadier.CommandDispatcher;
|
import com.mojang.brigadier.CommandDispatcher;
|
||||||
import com.mojang.brigadier.arguments.ArgumentType;
|
|
||||||
|
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
import net.minecraft.command.Commands;
|
import net.minecraft.command.Commands;
|
||||||
import net.minecraftforge.common.ForgeConfigSpec;
|
import net.minecraftforge.common.ForgeConfigSpec;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
|
|
||||||
|
import static co.fantabos.bscv.BoSCoVicino.log;
|
||||||
|
|
||||||
public abstract class Module {
|
public abstract class Module {
|
||||||
public enum Group {
|
public enum Group {
|
||||||
CORE,
|
CORE,
|
||||||
|
@ -53,11 +54,13 @@ public abstract class Module {
|
||||||
MinecraftForge.EVENT_BUS.register(this);
|
MinecraftForge.EVENT_BUS.register(this);
|
||||||
this.enabled.set(true);
|
this.enabled.set(true);
|
||||||
this.onEnabled();
|
this.onEnabled();
|
||||||
|
log(String.format("%s enabled", this.name));
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void disable() {
|
public final void disable() {
|
||||||
MinecraftForge.EVENT_BUS.unregister(this);
|
MinecraftForge.EVENT_BUS.unregister(this);
|
||||||
this.enabled.set(false);
|
this.enabled.set(false);
|
||||||
this.onDisabled();
|
this.onDisabled();
|
||||||
|
log(String.format("%s disabled", this.name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue