summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/net/flarn/noctis/Noctis.java7
-rw-r--r--src/main/java/net/flarn/noctis/commands/CommandTimeFixed.java9
2 files changed, 6 insertions, 10 deletions
diff --git a/src/main/java/net/flarn/noctis/Noctis.java b/src/main/java/net/flarn/noctis/Noctis.java
index 403130e..1b5d622 100644
--- a/src/main/java/net/flarn/noctis/Noctis.java
+++ b/src/main/java/net/flarn/noctis/Noctis.java
@@ -6,6 +6,7 @@ import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.relauncher.Side;
import net.flarn.noctis.client.gui.GuiHandler;
@@ -46,7 +47,6 @@ public class Noctis {
Recipes.init();
Recipes.initCatalysedRecipes();
NetworkRegistry.INSTANCE.registerGuiHandler(Noctis.instance, new GuiHandler());
- CommandTimeFixed.registerReplacementCommand();
}
@Mod.EventHandler
@@ -57,4 +57,9 @@ public class Noctis {
}
}
+ @Mod.EventHandler
+ public void serverLoad(FMLServerStartingEvent event) {
+ event.registerServerCommand(new CommandTimeFixed());
+ }
+
}
diff --git a/src/main/java/net/flarn/noctis/commands/CommandTimeFixed.java b/src/main/java/net/flarn/noctis/commands/CommandTimeFixed.java
index cd5df63..da99506 100644
--- a/src/main/java/net/flarn/noctis/commands/CommandTimeFixed.java
+++ b/src/main/java/net/flarn/noctis/commands/CommandTimeFixed.java
@@ -28,13 +28,4 @@ public class CommandTimeFixed extends CommandTime {
}
}
- public static void registerReplacementCommand() {
- CommandHandler cm = (CommandHandler)FMLCommonHandler.instance().getMinecraftServerInstance().getCommandManager();
- if (cm == null) {
- LogHelper.warn("Unable to register replacement time command, server does not have usable command manager.");
- } else {
- cm.registerCommand(new CommandTimeFixed());
- }
- }
-
}