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

SpongeBukkitMod.java 文件源码 项目:SpongeBukkit 阅读 22 收藏 0 点赞 0 评论 0
@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();
}
ExampleMod.java 文件源码 项目:Minecraft-Forge-Class-Template 阅读 19 收藏 0 点赞 0 评论 0
/**
 * 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
}
TomP2P.java 文件源码 项目:Minecraft-TomP2P 阅读 21 收藏 0 点赞 0 评论 0
/**
 * 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");
    }
}
EnhancedAdventuronics.java 文件源码 项目:EnchancedAdventuronics 阅读 16 收藏 0 点赞 0 评论 0
@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.java 文件源码 项目:BetterLoadingScreen_1.7 阅读 18 收藏 0 点赞 0 评论 0
@EventHandler
@SideOnly(Side.SERVER)
public void serverAboutToStart(FMLServerAboutToStartEvent event) {
    ProgressDisplayer.close();
}
SpongeFMLEventListener.java 文件源码 项目:SpongeBukkit 阅读 15 收藏 0 点赞 0 评论 0
@Mod.EventHandler
public void on(FMLServerAboutToStartEvent event)
{
    mod.getLogger().info("###### ServerAboutToStartEvent ######");
}
DimensionalPockets.java 文件源码 项目:Dimensional-Pockets 阅读 19 收藏 0 点赞 0 评论 0
@EventHandler
public void onServerAboutToStart(FMLServerAboutToStartEvent event) {
    // PocketRegistry needs to be loaded before the TileEntities are read from NBT
    PocketRegistry.loadData();
}
Physis.java 文件源码 项目:ShadowsOfPhysis 阅读 24 收藏 0 点赞 0 评论 0
@Mod.EventHandler
public void serverPreStarting(FMLServerAboutToStartEvent event) {
    proxy.serverPreStarting(event);
}
CommonProxy.java 文件源码 项目:ShadowsOfPhysis 阅读 22 收藏 0 点赞 0 评论 0
public void serverPreStarting(FMLServerAboutToStartEvent event) {
    //ServerData.reload(false);
}
ATemplateMod.java 文件源码 项目:AbacusCommonsLib 阅读 18 收藏 0 点赞 0 评论 0
/**
 * 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);
IPythonMod.java 文件源码 项目:minecraft-mod-python 阅读 22 收藏 0 点赞 0 评论 0
/**
 * Called when the server-about-to-start event occurs.
 *
 * *event* is the server-about-to-start event.
 */
public void serverAboutToStart(FMLServerAboutToStartEvent event);
JavaMod.java 文件源码 项目:minecraft-mod-python 阅读 21 收藏 0 点赞 0 评论 0
/**
 * 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);
}


问题


面经


文章

微信
公众号

扫码关注公众号