Added an event for registering commands. closes #6968 (#6969)

This commit is contained in:
Jared authored and GitHub committed 2020-07-15 12:30:41 -07:00
1 parent 6722e7a428
commit 00013865b0
6 files changed
+67 -15

No files matched your search

@@ -19,14 +19,13 @@
package net.minecraftforge.fml.event.server;
import com.mojang.brigadier.CommandDispatcher;
import net.minecraft.command.CommandSource;
import net.minecraft.server.MinecraftServer;
/**
* Called after {@link FMLServerAboutToStartEvent} and before {@link FMLServerStartedEvent}.
* This event allows for customizations of the server, such as loading custom commands, perhaps customizing recipes or
* other activities.
* This event allows for customizations of the server.
*
* If you need to add commands use {@link net.minecraftforge.event.RegisterCommandsEvent}.
*
* @author cpw
*/
@@ -37,7 +36,4 @@ public class FMLServerStartingEvent extends ServerLifecycleEvent
super(server);
}
public CommandDispatcher<CommandSource> getCommandDispatcher() {
return server.getCommandManager().getDispatcher();
}
}