cpw.mods.fml.common.event.FMLServerStartingEvent Java Examples

The following examples show how to use cpw.mods.fml.common.event.FMLServerStartingEvent. 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: MainRegistry.java    From NewHorizonsCoreMod with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Do some stuff once the server starts
 *
 * @param pEvent
 */
@Mod.EventHandler
public void serverLoad(FMLServerStartingEvent pEvent)
{
    if (CoreConfig.ModHazardousItems_Enabled) {
        pEvent.registerServerCommand(new HazardousItemsCommand());
    }
    if (CoreConfig.ModCustomToolTips_Enabled) {
        pEvent.registerServerCommand(new CustomToolTipsCommand());
    }
    if (CoreConfig.ModItemInHandInfo_Enabled) {
        pEvent.registerServerCommand(new ItemInHandInfoCommand());
    }
    if (CoreConfig.ModCustomFuels_Enabled) {
        pEvent.registerServerCommand(new CustomFuelsCommand());
    }
    if (CoreConfig.ModCustomDrops_Enabled) {
        pEvent.registerServerCommand(new CustomDropsCommand());
    }
    if (YAMCore.isDebug()) {
        pEvent.registerServerCommand(new AllPurposeDebugCommand());
    }
}
 
Example #2
Source File: BurlapCraft.java    From burlapcraft with GNU Lesser General Public License v3.0 6 votes vote down vote up
@EventHandler
  public void serverLoad(FMLServerStartingEvent event)
  {
      // register server commands
  	event.registerServerCommand(new CommandTeleport());
  	event.registerServerCommand(new CommandSmoothMove());
  	event.registerServerCommand(new CommandAStar());
  	event.registerServerCommand(new CommandBFS());
  	event.registerServerCommand(new CommandVI());
  	event.registerServerCommand(new CommandRMax());
  	event.registerServerCommand(new CommandCreateDungeons());
      event.registerServerCommand(new CommandInventory());
      event.registerServerCommand(new CommandCheckState());
      event.registerServerCommand(new CommandResetDungeon());
      event.registerServerCommand(new CommandCheckProps());
  	event.registerServerCommand(new CommandTest());
  	event.registerServerCommand(new CommandTerminalExplore());
      event.registerServerCommand(new CommandCurrentPath());
event.registerServerCommand(new CommandReachable());
      
  }
 
Example #3
Source File: MyTown.java    From MyTown2 with The Unlicense 6 votes vote down vote up
@EventHandler
public void serverStarting(FMLServerStartingEvent ev) {
    EconomyProxy.init();
    checkConfig();
    registerCommands();
    Commands.populateCompletionMap();

    jsonConfigs.add(new WildPermsConfig(Constants.CONFIG_FOLDER + "/WildPerms.json"));
    jsonConfigs.add(new FlagsConfig(Constants.CONFIG_FOLDER + "/DefaultFlags.json"));
    jsonConfigs.add(new RanksConfig(Constants.CONFIG_FOLDER + "/DefaultTownRanks.json"));
    for (JsonConfig jsonConfig : jsonConfigs) {
        jsonConfig.init();
    }

    ProtectionParser.start();
    //SafemodeHandler.setSafemode(!DatasourceProxy.start(config));
    datasource = new MyTownDatasource();
    LOG.info("Started");
}
 
Example #4
Source File: RegisterServerCommands.java    From bartworks with MIT License 5 votes vote down vote up
public static void registerAll(FMLServerStartingEvent event){
    event.registerServerCommand(new SummonRuin());
    event.registerServerCommand(new ChangeConfig());
    event.registerServerCommand(new PrintRecipeListToFile());
    event.registerServerCommand(new ClearCraftingCache());
    event.registerServerCommand(new GetWorkingDirectory());
    event.registerServerCommand(new RunGC());
}
 
Example #5
Source File: LookingGlass.java    From LookingGlass with GNU General Public License v3.0 5 votes vote down vote up
@EventHandler
public void serverStart(FMLServerStartingEvent event) {
	MinecraftServer mcserver = event.getServer();
	// Register commands
	((ServerCommandManager) mcserver.getCommandManager()).registerCommand(new CommandCreateView());
	// Start up the packet dispatcher we use for throttled data to client.
	ServerPacketDispatcher.getInstance().start(); //Note: This might need to be preceded by a force init of the ServerPacketDispatcher.  Doesn't seem to currently have any issues, though.
}
 
Example #6
Source File: BartWorksCrossmod.java    From bartworks with MIT License 5 votes vote down vote up
@Mod.EventHandler
public void onFMLServerStart(FMLServerStartingEvent event) {
    if (LoaderReference.miscutils)
        for (Object s : RadioHatchCompat.TranslateSet){
            StringTranslate.inject(new ReaderInputStream(new StringReader((String) s)));
        }
}
 
Example #7
Source File: TickDynamicMod.java    From TickDynamic with MIT License 5 votes vote down vote up
@Subscribe
public void serverStart(FMLServerStartingEvent event) {
	event.registerServerCommand(new CommandHandler(this));
	
	tpsTimer.schedule(new TimerTickTask(this), 1000, 1000);
	versionCheckDone = false;
	versionChecker.runVersionCheck();
	
	
	server = event.getServer();
}
 
Example #8
Source File: QCraft.java    From qcraft-mod with Apache License 2.0 5 votes vote down vote up
@Mod.EventHandler
public void serverLoad( FMLServerStartingEvent event )
{
    event.registerServerCommand( new QCraftCommand() );
    EncryptionSavedData.get(getDefWorld()); //trigger load of inter-server portal validations from disk to memory
    EntanglementSavedData.get(getDefWorld()); //trigger load of entanglements and portals from disk to memory
}
 
Example #9
Source File: ArchimedesShipMod.java    From archimedes-ships with MIT License 5 votes vote down vote up
@SuppressWarnings("unchecked")
@EventHandler
public void serverStarting(FMLServerStartingEvent event)
{
	registerASCommand(event, new CommandASHelp());
	registerASCommand(event, new CommandDisassembleShip());
	registerASCommand(event, new CommandShipInfo());
	registerASCommand(event, new CommandDisassembleNear());
	Collections.sort(CommandASHelp.asCommands);
}
 
Example #10
Source File: NBTEdit.java    From NBTEdit with GNU General Public License v3.0 5 votes vote down vote up
@EventHandler
public void serverStarting(FMLServerStartingEvent event) {
	MinecraftServer server= event.getServer();
	ServerCommandManager serverCommandManager = (ServerCommandManager) server.getCommandManager();
	serverCommandManager.registerCommand(new CommandNBTEdit());
	logger.fine("Server Starting -- Added \"/nbtedit\" command");
}
 
Example #11
Source File: OpenPeripheralCore.java    From OpenPeripheral with MIT License 4 votes vote down vote up
@EventHandler
public void severStart(FMLServerStartingEvent evt) {
	evt.registerServerCommand(new CommandDump("op_dump", evt.getServer().isDedicatedServer()));
}
 
Example #12
Source File: PneumaticCraft.java    From PneumaticCraft with GNU General Public License v3.0 4 votes vote down vote up
@EventHandler
public void onServerStart(FMLServerStartingEvent event){
    ServerCommandManager comManager = (ServerCommandManager)MinecraftServer.getServer().getCommandManager();
    new PCCommandManager().init(comManager);
}
 
Example #13
Source File: MoCreatures.java    From mocreaturesdev with GNU General Public License v3.0 4 votes vote down vote up
@ServerStarting
public void serverStarting(FMLServerStartingEvent event)
{
    event.registerServerCommand(new CommandMoCreatures());
}
 
Example #14
Source File: WirelessRedstoneCore.java    From WirelessRedstone with MIT License 4 votes vote down vote up
@EventHandler
public void serverStarting(FMLServerStartingEvent event) {
    CommandHandler commandManager = (CommandHandler) event.getServer().getCommandManager();
    commandManager.registerCommand(new CommandFreq());
}
 
Example #15
Source File: ElectroMagicTools.java    From Electro-Magic-Tools with GNU General Public License v3.0 4 votes vote down vote up
@EventHandler
public void onFMLServerStart(FMLServerStartingEvent event) {
    event.registerServerCommand(new CommandOutputs());
}
 
Example #16
Source File: ArchimedesShipMod.java    From archimedes-ships with MIT License 4 votes vote down vote up
private void registerASCommand(FMLServerStartingEvent event, CommandBase commandbase)
{
	event.registerServerCommand(commandbase);
	CommandASHelp.asCommands.add(commandbase);
}
 
Example #17
Source File: CommonProxy.java    From OmniOcular with Apache License 2.0 4 votes vote down vote up
@Override
public void registerServerCommand(FMLServerStartingEvent event) {
    event.registerServerCommand(new CommandReloadConfig());
}
 
Example #18
Source File: OmniOcular.java    From OmniOcular with Apache License 2.0 4 votes vote down vote up
@Mod.EventHandler
    void onServerStart(FMLServerStartingEvent event) {
//        LogHelper.info("FMLServerStartingEvent");
        proxy.registerServerCommand(event);
    }
 
Example #19
Source File: ChickenChunks.java    From ChickenChunks with MIT License 4 votes vote down vote up
@EventHandler
public void serverStarting(FMLServerStartingEvent event) {
    proxy.registerCommands(event);
}
 
Example #20
Source File: ChunkLoaderProxy.java    From ChickenChunks with MIT License 4 votes vote down vote up
public void registerCommands(FMLServerStartingEvent event)
{
    CommandHandler commandManager = (CommandHandler)event.getServer().getCommandManager();
    commandManager.registerCommand(new CommandChunkLoaders());
    commandManager.registerCommand(new CommandDebugInfo());
}
 
Example #21
Source File: EnderStorage.java    From EnderStorage with MIT License 4 votes vote down vote up
@EventHandler
public void serverStart(FMLServerStartingEvent event) {
    CommandHandler commandManager = (CommandHandler) event.getServer().getCommandManager();
    commandManager.registerCommand(new CommandEnderStorage());
}
 
Example #22
Source File: EtFuturum.java    From Et-Futurum with The Unlicense 4 votes vote down vote up
@EventHandler
public void serverStarting(FMLServerStartingEvent event) {
	if (EtFuturum.enablePlayerSkinOverlay)
		event.registerServerCommand(new SetPlayerModelCommand());
}
 
Example #23
Source File: ForgeMain.java    From FastAsyncWorldedit with GNU General Public License v3.0 4 votes vote down vote up
@Mod.EventHandler
public void serverLoad(FMLServerStartingEvent event) {
    IMP.insertCommands();
}
 
Example #24
Source File: NovaMinecraft.java    From NOVA-Core with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Mod.EventHandler
public void serverStarting(FMLServerStartingEvent event) {
	Game.events().publish(new ServerEvent.Start());
}
 
Example #25
Source File: IProxy.java    From OmniOcular with Apache License 2.0 votes vote down vote up
void registerServerCommand(FMLServerStartingEvent event);