net.minecraft.command.ICommandManager Java Examples

The following examples show how to use net.minecraft.command.ICommandManager. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HyperiumHandlers.java    From Hyperium with GNU Lesser General Public License v3.0 5 votes vote down vote up
@InvokeEvent
public void tick(TickEvent event) {
    // Runs first tick
    IntegratedServer integratedServer = Minecraft.getMinecraft().getIntegratedServer();
    if (integratedServer != null) {
        ICommandManager commandManager = integratedServer.getCommandManager();
        if (commandManager != null) {
            EventBus.INSTANCE.unregister(HyperiumHandlers.class);
        }
    }
}
 
Example #2
Source File: GokiStats.java    From GokiStats with MIT License 5 votes vote down vote up
@Mod.EventHandler
public void serverStart(FMLServerStartingEvent event) {
    MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
    ICommandManager command = server.getCommandManager();
    ServerCommandManager serverCommand = (ServerCommandManager) command;
    serverCommand.registerCommand(new StatsCommand());
    // TODO notice it's a reversion
}
 
Example #3
Source File: Roguelike.java    From minecraft-roguelike with GNU General Public License v3.0 5 votes vote down vote up
@EventHandler
public void serverStart(FMLServerStartingEvent event){
	MinecraftServer server = event.getServer();
	ICommandManager command = server.getCommandManager();
	ServerCommandManager serverCommand = ((ServerCommandManager) command);
	serverCommand.registerCommand(new CommandRoguelike());
}