本文整理汇总了Java中cpw.mods.fml.common.event.FMLServerAboutToStartEvent类的典型用法代码示例。如果您正苦于以下问题:Java FMLServerAboutToStartEvent类的具体用法?Java FMLServerAboutToStartEvent怎么用?Java FMLServerAboutToStartEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FMLServerAboutToStartEvent类属于cpw.mods.fml.common.event包,在下文中一共展示了FMLServerAboutToStartEvent类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: on
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent; //导入依赖的package包/类
@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();
}
示例2: OnServerAboutToStart
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent; //导入依赖的package包/类
/**
* 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
}
示例3: serverAboutToStart
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent; //导入依赖的package包/类
/**
* 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");
}
}
示例4: onServerStart
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent; //导入依赖的package包/类
@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());
}
示例5: serverAboutToStart
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent; //导入依赖的package包/类
@EventHandler
@SideOnly(Side.SERVER)
public void serverAboutToStart(FMLServerAboutToStartEvent event) {
ProgressDisplayer.close();
}
示例6: on
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent; //导入依赖的package包/类
@Mod.EventHandler
public void on(FMLServerAboutToStartEvent event)
{
mod.getLogger().info("###### ServerAboutToStartEvent ######");
}
示例7: onServerAboutToStart
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent; //导入依赖的package包/类
@EventHandler
public void onServerAboutToStart(FMLServerAboutToStartEvent event) {
// PocketRegistry needs to be loaded before the TileEntities are read from NBT
PocketRegistry.loadData();
}
示例8: serverPreStarting
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent; //导入依赖的package包/类
@Mod.EventHandler
public void serverPreStarting(FMLServerAboutToStartEvent event) {
proxy.serverPreStarting(event);
}
示例9: serverPreStarting
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent; //导入依赖的package包/类
public void serverPreStarting(FMLServerAboutToStartEvent event) {
//ServerData.reload(false);
}
示例10: serverStartBefore
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent; //导入依赖的package包/类
/**
* 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);
示例11: serverAboutToStart
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent; //导入依赖的package包/类
/**
* Called when the server-about-to-start event occurs.
*
* *event* is the server-about-to-start event.
*/
public void serverAboutToStart(FMLServerAboutToStartEvent event);
示例12: serverAboutToStart
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent; //导入依赖的package包/类
/**
* 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);
}