net.minecraftforge.fml.event.server.FMLServerStartingEvent Java Examples

The following examples show how to use net.minecraftforge.fml.event.server.FMLServerStartingEvent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LifecycleEvents.java    From patchwork-api with GNU Lesser General Public License v2.1 7 votes vote down vote up
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!");
	}
}
 
Example #2
Source File: ForgeServerSparkPlugin.java    From spark with GNU General Public License v3.0 6 votes vote down vote up
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");
}
 
Example #3
Source File: ForgeSparkMod.java    From spark with GNU General Public License v3.0 5 votes vote down vote up
@SubscribeEvent
public void serverInit(FMLServerStartingEvent e) {
    ForgeServerSparkPlugin.register(this, e);
}
 
Example #4
Source File: EnderStorage.java    From EnderStorage with MIT License 5 votes vote down vote up
@SubscribeEvent
public void onServerStarting(FMLServerStartingEvent event) {
}
 
Example #5
Source File: ServerEventHandler.java    From Better-Sprinting with Mozilla Public License 2.0 5 votes vote down vote up
@SubscribeEvent
public static void onServerStarting(FMLServerStartingEvent e){
	ServerCommandConfig.register(e.getCommandDispatcher());
}
 
Example #6
Source File: CodeChickenLib.java    From CodeChickenLib with GNU Lesser General Public License v2.1 3 votes vote down vote up
@SubscribeEvent
public void onServerStarting(FMLServerStartingEvent event) {

}