Java源码示例:net.minecraftforge.fml.event.server.FMLServerStartingEvent

示例1
public static void handleServerStarting(final MinecraftServer server) {
	// TODO: Forge loads language data here. I haven't found any mods that use this behavior.

	if (MinecraftForge.EVENT_BUS.post(new FMLServerStartingEvent(server))) {
		throw new UnsupportedOperationException("FMLServerStartingEvent is not cancellable!");
	}
}
 
示例2
public static void register(ForgeSparkMod mod, FMLServerStartingEvent event) {
    MinecraftServer server = event.getServer();
    ForgeServerSparkPlugin plugin = new ForgeServerSparkPlugin(mod, server);

    CommandDispatcher<CommandSource> dispatcher = event.getCommandDispatcher();
    registerCommands(dispatcher, plugin, plugin, "spark");
    PermissionAPI.registerNode("spark", DefaultPermissionLevel.OP, "Access to the spark command");
}
 
示例3
@SubscribeEvent
public void serverInit(FMLServerStartingEvent e) {
    ForgeServerSparkPlugin.register(this, e);
}
 
示例4
@SubscribeEvent
public void onServerStarting(FMLServerStartingEvent event) {
}
 
示例5
@SubscribeEvent
public static void onServerStarting(FMLServerStartingEvent e){
	ServerCommandConfig.register(e.getCommandDispatcher());
}
 
示例6
@SubscribeEvent
public void onServerStarting(FMLServerStartingEvent event) {

}