@EventHandler public void onServerStarting(FMLServerStartingEvent event) { if (TragicConfig.getBoolean("allowDoom")) event.registerServerCommand(new tragicneko.tragicmc.commands.DoomCommand()); if (TragicConfig.getBoolean("allowDoomsdays")) event.registerServerCommand(new tragicneko.tragicmc.commands.DoomsdayComand()); if (!event.getServer().isFlightAllowed()) { TragicConfig.overrideObject("allowFlight", false); logWarning( "Flight potion effect is disabled due to the server not allowing it. Change the option in your server.properties file if you want it enabled."); } }
@EventHandler public void serverStarting(FMLServerStartingEvent event) { event.registerServerCommand(new CommandSCHelp()); event.registerServerCommand(new CommandModule()); }
@Override public void serverStarting(FMLServerStartingEvent event) { super.serverStarting(event); event.registerServerCommand(new CommandSchematicaDownload()); }
private void registerCommands(FMLServerStartingEvent event) { event.registerServerCommand(new Commands()); event.registerServerCommand(new ShopCommand()); }
/** * Sets the server starting event which the {@link * FMLServerStartingEvent#registerServerCommand(net.minecraft.command.ICommand)} is called against * to register the commands. * * @param event The server starting event */ public synchronized void flush(FMLServerStartingEvent event) { for (ForgeCommand cmd : this.pending) { event.registerServerCommand(cmd); } this.pending.clear(); }