From 44ee404970edfcc0f411d59f08934f81ccc304f6 Mon Sep 17 00:00:00 2001 From: Pepich Date: Wed, 1 Feb 2017 20:16:00 +0100 Subject: [PATCH] Fixed warn not being loaded properly --- src/com/redstoner/modules/warn/Warn.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/com/redstoner/modules/warn/Warn.java b/src/com/redstoner/modules/warn/Warn.java index b388198..e4afa4f 100644 --- a/src/com/redstoner/modules/warn/Warn.java +++ b/src/com/redstoner/modules/warn/Warn.java @@ -11,6 +11,8 @@ import com.redstoner.modules.Module; @Version(major = 1, minor = 0, revision = 1, compatible = 1) public class Warn implements Module { + private boolean enabled = false; + @Command(hook = "warn") public void warn_normal(CommandSender sender) { @@ -25,10 +27,22 @@ public class Warn implements Module Utils.broadcast(null, "§2Possible lag incoming! - §9" + name, null); } + @Override + public void onEnable() + { + enabled = true; + } + + @Override + public void onDisable() + { + enabled = false; + } + @Override public boolean enabled() { - return true; + return enabled; } // @noformat