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

项目:SpongeBukkit    文件:SpongeBukkitMod.java   
@Mod.EventHandler
public void on(FMLServerAboutToStartEvent event)
{
    getLogger().info("Initializing a new bukkit server");
    MinecraftServer minecraftServer = event.getServer();
    VolatileServer volatileServer;
    try
    {
        volatileServer = (VolatileServer)Bukkit.getServer();
        Preconditions.checkNotNull(volatileServer);
    }
    catch (Exception e)
    {
        throw new IllegalStateException("Bukkit.getServer is NOT a VolatileServer!",e);
    }

    BukkitServer server = new BukkitServer(this, minecraftServer);
    volatileServer.setCurrentServer(server);
    server.start();
}
项目:Minecraft-Forge-Class-Template    文件:ExampleMod.java   
/**
 * This event will be fired before server start.
 * Only the ServerSide will receive this event.
 * 
 * @param event
 */
public void OnServerAboutToStart(FMLServerAboutToStartEvent event)
{
    /*!gen.mod.hook.OnServerAboutToStart*/
    /**/

    //TODO:Add your own code here
}
项目:Minecraft-TomP2P    文件:TomP2P.java   
/**
 * Called when the Minecraft server started.
 * 
 * @param event
 *            the event.
 */
@ServerAboutToStart
public void serverAboutToStart(FMLServerAboutToStartEvent event) {
    try {
        Config.Server c = config.server;
        ServerConfig sc = new ServerConfig(c.address, c.externalAddress,
                c.port, c.behindFirewall, c.storageType, c.storage);
        ((IServer) P2P.get(P2P.SERVER_PROVIDER)).start(sc);
    } catch (Exception e) {
        FMLLog.log(MOD_ID, Level.SEVERE, e, "Can't start the server");
    }
}
项目:EnchancedAdventuronics    文件:EnhancedAdventuronics.java   
@EventHandler
public void onServerStart(FMLServerAboutToStartEvent event){
    CommandHandler manager = (CommandHandler) event.getServer().getCommandManager();
    manager.registerCommand(new VelocityCommand());
    manager.registerCommand(new CTabCommand());
    manager.registerCommand(new NotifyCommand());
    manager.registerCommand(new WipeEntitiesCommand());

}
项目:BetterLoadingScreen_1.7    文件:BetterLoadingScreen.java   
@EventHandler
@SideOnly(Side.SERVER)
public void serverAboutToStart(FMLServerAboutToStartEvent event) {
    ProgressDisplayer.close();
}
项目:SpongeBukkit    文件:SpongeFMLEventListener.java   
@Mod.EventHandler
public void on(FMLServerAboutToStartEvent event)
{
    mod.getLogger().info("###### ServerAboutToStartEvent ######");
}
项目:Dimensional-Pockets    文件:DimensionalPockets.java   
@EventHandler
public void onServerAboutToStart(FMLServerAboutToStartEvent event) {
    // PocketRegistry needs to be loaded before the TileEntities are read from NBT
    PocketRegistry.loadData();
}
项目:ShadowsOfPhysis    文件:Physis.java   
@Mod.EventHandler
public void serverPreStarting(FMLServerAboutToStartEvent event) {
    proxy.serverPreStarting(event);
}
项目:ShadowsOfPhysis    文件:CommonProxy.java   
public void serverPreStarting(FMLServerAboutToStartEvent event) {
    //ServerData.reload(false);
}
项目:AbacusCommonsLib    文件:ATemplateMod.java   
/**
 * A public method to handle the server-side pre-starting functionality.<p/>
 * From the {@link EventHandler} javadoc for methods using the {@link FMLServerAboutToStartEvent} parameter:
 * <pre>
 * FMLServerAboutToStartEvent:
 * Use if you need to handle something before the server has even been created.
 * </pre>
 * @param event A Forge event handler for when the server has not yet started.
 */
@EventHandler
abstract public void serverStartBefore(FMLServerAboutToStartEvent event);
项目:minecraft-mod-python    文件:IPythonMod.java   
/**
 * Called when the server-about-to-start event occurs.
 *
 * *event* is the server-about-to-start event.
 */
public void serverAboutToStart(FMLServerAboutToStartEvent event);
项目:minecraft-mod-python    文件:JavaMod.java   
/**
 * Send the server-about-to-start event to the python mod.
 *
 * *event* is the server-about-to-start event.
 */
public void serverAboutToStart(FMLServerAboutToStartEvent event) {
    this.log.fine("Server about to start.");
    this.pythonMod.serverAboutToStart(event);
}