Fixed commands no longer being registered after reload.
@@ -2,6 +2,7 @@ package com.ferreusveritas.dynamictrees.event.handlers;
import com.ferreusveritas.dynamictrees.command.DTCommand;
import com.ferreusveritas.dynamictrees.compat.seasons.SeasonHelper;
+import net.minecraftforge.event.RegisterCommandsEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.event.server.FMLServerStartingEvent;
@@ -9,9 +10,12 @@ public class ServerEventHandler {
@SubscribeEvent
public void onServerStart (final FMLServerStartingEvent event) {
- // Register DT command.
- new DTCommand().registerDTCommand(event.getServer().getCommands().getDispatcher());
SeasonHelper.getSeasonManager().flushMappings();
}
+ @SubscribeEvent
+ public void registerCommands(final RegisterCommandsEvent event) {
+ new DTCommand().registerDTCommand(event.getDispatcher());
+ }
+
}
