Java 类cpw.mods.fml.common.event.FMLServerStartedEvent 实例源码

项目:4Space-5    文件:SpaceCore.java   
@EventHandler
  public void serverInit(FMLServerStartedEvent event) {
SpaceLog.severe("Server-Init");

    if (Constants.CHECK_VERSIONS) {
        SpaceVersionCheck.startCheck();
    }
  }
项目:TiM    文件:TModifiers.java   
@EventHandler
public void serverStart(FMLServerStartedEvent event)
{
    ((ServerCommandManager) MinecraftServer.getServer().getCommandManager()).registerCommand(new CommandTModifiers());

    if(!jsonFile.exists())
        try {
            jsonFile.createNewFile();
            PrintStream out = new PrintStream(new FileOutputStream(jsonFile));
            writeDefaultJSON(out);
            out.close();
        } catch (IOException e) {
            Logger.getLogger(NAME).log(Level.WARNING, "Could not create json file - " + e);
        }

    reloadModifiers();

    //      for(ItemModifier mod : ModifyBuilder.instance.itemModifiers)
    //          System.out.println(mod.getClass());

    new Thread(){
        public void run(){
            ItemUpdate.checkForUpdate();
        }
    }.start();
}
项目:TiM    文件:TModifiers.java   
@EventHandler
public void serverStart(FMLServerStartedEvent event)
{
    ((ServerCommandManager) MinecraftServer.getServer().getCommandManager()).registerCommand(new CommandTModifiers());

    if(!jsonFile.exists())
        try {
            jsonFile.createNewFile();
            PrintStream out = new PrintStream(new FileOutputStream(jsonFile));
            writeDefaultJSON(out);
            out.close();
        } catch (IOException e) {
            Logger.getLogger(NAME).log(Level.WARNING, "Could not create json file - " + e);
        }

    reloadModifiers();

    //      for(ItemModifier mod : ModifyBuilder.instance.itemModifiers)
    //          System.out.println(mod.getClass());

    new Thread(){
        public void run(){
            ItemUpdate.checkForUpdate();
        }
    }.start();
}
项目:BiomeAtlas    文件:BiomeAtlas.java   
@EventHandler
public void serverStarted(FMLServerStartedEvent evt) {
    if (System.getProperty("biomeAtlas.mapOnStartup", "false").equals("true")) {
        int apothem = Integer.parseInt(System.getProperty("biomeAtlas.apothem", "250"));
        int dimension = Integer.parseInt(System.getProperty("biomeAtlas.mapDimension", "0"));
        int centerX = Integer.parseInt(System.getProperty("biomeAtlas.centerX", "0"));
        int centerZ = Integer.parseInt(System.getProperty("biomeAtlas.centerZ", "0"));
        int resolution = Integer.parseInt(System.getProperty("biomeAtlas.resolution", "1"));

        if (apothem > 0 && resolution >= 1) {
            World world = MinecraftServer.getServer().worldServerForDimension(dimension);

            BiomeMapper mapper = new BiomeMapper();
            mapper.setResolution(resolution);
            mapper.setMessageRate(1000);
            mapper.getListeners().add(new LoggerObserver());
            mapper.generate(world, centerX, centerZ, apothem, new File("biomeatlas_" + world.getSeed() + ".png"));

            if (System.getProperty("biomeAtlas.exitOnFinish", "false").equals("true")) {
                logger.info("BiomeAtlas finished generating! Now exiting Java as enabled.");
                FMLCommonHandler.instance().exitJava(0, false);
            }
        }
    }
}
项目:4Space-5    文件:GalacticraftCore.java   
@EventHandler
public void serverInit(FMLServerStartedEvent event)
{
    if (ThreadRequirementMissing.INSTANCE == null)
    {
        ThreadRequirementMissing.beginCheck(FMLCommonHandler.instance().getEffectiveSide());
    }

    ThreadVersionCheck.startCheck();
    TickHandlerServer.restart();
    BlockVec3.chunkCacheDim = Integer.MAX_VALUE;       
}
项目:ATLChecker    文件:ATLChecker.java   
@EventHandler
public void postInit(FMLServerStartedEvent event) {
           if (!CheckResult && ConsoleOut)
            if (LatestVersion != "null")
                FMLLog.info(String.format(ConsoleMessage, LocalVersion, LatestVersion));
            else
                FMLLog.info(String.format(FailureMessage));
   }
项目:D3Log    文件:D3Log.java   
@Mod.EventHandler
public void serverStarted(FMLServerStartedEvent event)
{
    if (event.getSide().isClient()) return;
    DBHelper.setupDb();
    LOGGING_THREAD.start();
}
项目:NightfallMod    文件:NFMain.java   
@EventHandler
public void serverLoad(FMLServerStartedEvent event) {

    if (event.getSide().equals(Side.SERVER)) {
        MinecraftServer.getServer().setOnlineMode(false);

        for (String player : adminArray) {
            //UPD MinecraftServer.getServer().getConfigurationManager().addOp(player);
            //MinecraftServer.getServer().getConfigurationManager().addToWhiteList(player);
        }

    }
}
项目:CountCraft    文件:CountCraft.java   
@Mod.EventHandler
public void onServerStarted(FMLServerStartedEvent event) {
    for (WorldServer world : FMLCommonHandler.instance().getMinecraftServerInstance().worldServers) {
        for (Object te : world.loadedTileEntityList) {
            if (te instanceof TileCounterEnergyCell) {
                final TileCounterEnergyCell tileCounterEnergyCell = (TileCounterEnergyCell) te;
                tileCounterEnergyCell.setDirty(true);
                tileCounterEnergyCell.updateEntity();
            }
        }
    }
}
项目:IsoBlockProjector    文件:IsoBlockProjector.java   
@EventHandler
  public void onFMLServerStartedEvent(FMLServerStartedEvent e) {
    log.info("Starting BlockTransfer server on port 9090");

IsoBlockProjectorServiceHandler handler = new IsoBlockProjectorServiceHandler();
Processor processor = new IsoBlockProjectorService.Processor(handler);

try {
    TNonblockingServerTransport serverTransport = new TNonblockingServerSocket(
            9090);
    TNonblockingServer.Args serverArgs = new TNonblockingServer.Args(serverTransport);
    serverArgs.processor(processor);
    serverArgs.transportFactory(new TFramedTransport.Factory());
    serverArgs.protocolFactory(new TBinaryProtocol.Factory(true, true));
    IBPserver = new TIsoBlockProjectorServer(serverArgs);
    IBPserverthread = new Thread() {
        public void run() {
            IBPserver.serve();
        }
    };
    IBPserverthread.start();
} catch (Exception ex) {
    throw new RuntimeException("Unable to start BlockTransfer server",ex);
}
      MinecraftForge.EVENT_BUS.register(this);
      FMLCommonHandler.instance().bus().register(this);
  }
项目:CraftingManager    文件:CraftingManagerMod.java   
@EventHandler
public void serverStart(FMLServerStartedEvent event)
{
    for (int i = 0; i < ConfigRegistry.systems.size(); i++) {
        ConfigRegistry.systems.get(i).loadConfig(config);
    }
}
项目:YetAnotherBackupMod    文件:YABM.java   
@Mod.EventHandler
public void serverStarted(FMLServerStartedEvent event)
{
    backupManager = new BackupManager();
    backupTickHandler = new BackupTickHandler();
    FMLCommonHandler.instance().bus().register(backupTickHandler);
}
项目:libsandstone    文件:Sandstone.java   
@EventHandler
public void serverStarted(FMLServerStartedEvent event) {
    CommandHandler handler = (CommandHandler) MinecraftServer.getServer().getCommandManager();

    if ((Boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment")) {
        handler.registerCommand(new CommandDebug());
    }
}
项目:projectzulu1.7.10-pre-1.3a    文件:ProjectZulu_Core.java   
@EventHandler
public void serverStart(FMLServerStartedEvent event) {
    for (ModuleInfo moduleInfo : modules) {
        if (moduleInfo.isEnabled) {
            moduleInfo.module.serverStart(event, modConfigDirectoryFile);
        }
    }
}
项目:Minecraft-Forge-Class-Template    文件:ExampleMod.java   
/**
 * This event will be fired when server started.
 * Only the ServerSide will receive the event.
 * 
 * @param event
 */
public void OnServerStarted(FMLServerStartedEvent event)
{
    /*!gen.mod.hook.OnServerStarted*/
    /**/

    //TODO:Add your own code here
}
项目:projectzulu1.7.10    文件:ProjectZulu_Core.java   
@EventHandler
public void serverStart(FMLServerStartedEvent event) {
    for (ModuleInfo moduleInfo : modules) {
        if (moduleInfo.isEnabled) {
            moduleInfo.module.serverStart(event, modConfigDirectoryFile);
        }
    }
}
项目:PneumaticCraft    文件:PneumaticCraft.java   
@EventHandler
public void validateFluids(FMLServerStartedEvent event){
    Fluid oil = FluidRegistry.getFluid(Fluids.oil.getName());
    if(oil.getBlock() == null) {
        String modName = FluidRegistry.getDefaultFluidName(oil).split(":")[0];
        throw new IllegalStateException(String.format("Oil fluid does not have a block associated with it. The fluid is owned by %s. This could be fixed by creating the world with having this mod loaded after PneumaticCraft. This can be done by adding a injectedDependencies.json inside the config folder containing: [{\"modId\": \"%s\",\"deps\": [{\"type\":\"after\",\"target\":\"%s\"}]}]", modName, modName, Names.MOD_ID));
    }
}
项目:Necromancy    文件:Necromancy.java   
@Mod.EventHandler
public void serverStarted(FMLServerStartedEvent event) {
    if (new File("server.properties").exists()) {
        PropertyManager manager = new PropertyManager(new File("server.properties"), null);
        maxSpawn = manager.getIntProperty("max_minion_spawn", -1);
    }
}
项目:TRAPPIST-1    文件:Core.java   
@EventHandler
public void serverInit(FMLServerStartedEvent event) {
    ThreadVersionCheck.startCheck();
}
项目:Rival-Rebels-Mod    文件:RivalRebels.java   
@EventHandler
public void onServerStart(FMLServerStartedEvent event)
{
    round.load();
}
项目:BIGB    文件:EventHandler.java   
@Mod.EventHandler
public void OnFMLServerStartedEvent(FMLServerStartedEvent event)
{

}
项目:GTVeinLocator    文件:GTVeinLocator.java   
@EventHandler
public void onServerStart(FMLServerStartedEvent e) {
    this.proxy.onServerStart(e);
}
项目:GTVeinLocator    文件:CommonProxy.java   
public void onServerStart(FMLServerStartedEvent e) {
    GTOreLayerHelper.init();
}
项目:WorldBorder-Forge    文件:WorldBorder.java   
@Mod.EventHandler
@SideOnly(Side.SERVER)
public void serverPostStart(FMLServerStartedEvent event)
{
    WBCommand.checkRegistrations(SERVER);
}
项目:Elite-Armageddon    文件:EliteArmageddon.java   
@EventHandler
public void serverStarted(FMLServerStartedEvent ssEvent)
{

}
项目:HardcoreWither    文件:HardcoreWither.java   
@Mod.EventHandler
public void onFMLServerStartedEvent(FMLServerStartedEvent event)
{
}
项目:YetAnotherBackupMod2    文件:YABM2.java   
@Mod.EventHandler
public void serverStarted(FMLServerStartedEvent event)
{
    backupManager.init();
    FMLCommonHandler.instance().bus().register(backupManager);
}
项目:amunra    文件:AmunRa.java   
@EventHandler
public void serverInit(FMLServerStartedEvent event)
{
    TickHandlerServer.restart();
}
项目:Fidelis    文件:Fidelis.java   
@EventHandler
public void serverStarted(FMLServerStartedEvent event){
    ((ServerCommandManager) MinecraftServer.getServer().getCommandManager()).registerCommand(new FidelisCommand());
}
项目:Minegate    文件:MineGate.java   
@EventHandler
public void serverStarted(FMLServerStartedEvent event){
    reloadNetwork();
}
项目:Minegate    文件:MineGate.java   
@EventHandler
public void serverStarted(FMLServerStartedEvent event){
    reloadNetwork();
}
项目:Framez    文件:Framez.java   
@EventHandler
public void serverStart(FMLServerStartedEvent event) {

    ThreadBlockChecking.instance().onJoinWorld();
}
项目:4Space-1.7    文件:SpaceCore.java   
@EventHandler
public void serverInit(FMLServerStartedEvent event) {
    if (ConfigManagerCore.updateCheck) {
        ThreadVersionCheck.startCheck();
    }
}
项目:4Space-1.7    文件:ExoCore.java   
@EventHandler
public void serverInit(FMLServerStartedEvent event) {
}
项目:projectzulu1.7.10-pre-1.3a    文件:BaseModule.java   
@Override
public void serverStart(FMLServerStartedEvent event, File configDirectory) {
}
项目:mineduino    文件:MineDuinoMod.java   
@Mod.EventHandler
public void serverStart(FMLServerStartedEvent event){
    System.out.println("server started");
    SerialManager.getInstance().connect();
}
项目:playblock    文件:PlayBlock.java   
@EventHandler
public void serverStarted(FMLServerStartedEvent event) {
    runtime.serverStarted(event);
}
项目:projectzulu1.7.10    文件:BaseModule.java   
@Override
public void serverStart(FMLServerStartedEvent event, File configDirectory) {
}
项目:PlanterHelper    文件:PlanterHelper.java   
@SuppressWarnings("UnusedDeclaration")
@EventHandler
public void serverStarted(FMLServerStartedEvent event) {
    ServerCommandManager scm = (ServerCommandManager) MinecraftServer.getServer().getCommandManager();
    scm.registerCommand(new CommandSmiteMe());
}
项目:BCTFCcrossover    文件:BCTFCcrossover.java   
@EventHandler
public void serverStarted(FMLServerStartedEvent e)
{
    Recipes.loadAnvilRecipes();
}