@EventHandler public static void onServerStarted(FMLServerStartedEvent event) { if (ModConfiguration.halloweenCheckInterval > 0) { handle = scheduler.scheduleAtFixedRate(new Runnable() { @Override public void run() { boolean isHalloween = ModConfiguration.isHalloween(); if (isHalloween != ModConfiguration.isHalloween) { ModConfiguration.isHalloween = isHalloween; NBTTagCompound compound = ModConfiguration.writeToNBT(new NBTTagCompound()); HalloweenMod.NETWORK.sendToAll(new ConfigSyncMessage(compound)); } } }, 0, ModConfiguration.halloweenCheckInterval, TimeUnit.MINUTES); } }
public static void worldLoad(FMLServerStartedEvent serverStartedEvent) throws IOException { File worldFile = new File(FMLCommonHandler.instance().getSavesDirectory(), FMLCommonHandler.instance().getMinecraftServerInstance().getFolderName()); File dataFile = new File(worldFile, fileName); if (!dataFile.exists()) { return; } String json = FileUtils.readFileToString(dataFile); Gson gson = new Gson(); Type typeOfHashMap = new TypeToken<List<DimData>>() { }.getType(); List<DimData> tempDataList = gson.fromJson(json, typeOfHashMap); for (DimData data : tempDataList) { DimensionType type = DimensionType.register("technicaldimensions", data.name, data.id, CustomWorldProvider.class, false); DimensionManager.registerDimension(data.id, type); data.type = type; dimDataHashMap.put(data.id, data); dimDataList.add(data); } }
@EventHandler public void onServerStarting(FMLServerStartedEvent event){ ServerCommandManager mgr = (ServerCommandManager) MinecraftServer.getServer().getCommandManager(); mgr.registerCommand(new ClaimCommand()); mgr.registerCommand(new DeleteClaim()); mgr.registerCommand(new ModifyACL()); mgr.registerCommand(new ShowClaims()); mgr.registerCommand(new HideClaims()); mgr.registerCommand(new TransferClaim()); mgr.registerCommand(new Execute()); mgr.registerCommand(new AdminInvisibility()); mgr.registerCommand(new AdminMode()); mgr.registerCommand(new TempBan()); mgr.registerCommand(new PermaBan()); mgr.registerCommand(new UnBan()); mgr.registerCommand(new OpenInventory()); mgr.registerCommand(new Warp()); }
@EventHandler public void serverStarted(FMLServerStartedEvent event) throws Throwable { // Make sure to inform the "right" MinecraftJUnitRunner, that has been loaded // by the system classloader. Class<?> cls = ClassLoader.getSystemClassLoader().loadClass(MinecraftJUnitRunner.class.getName()); Method m = cls.getMethod("onGameStarted"); m.invoke(null); }
@Override public void serverInit(FMLServerStartedEvent event) { if (!creativeBlock.config().enableDynmapSupport) { return; } dynmapSupport.copyTextures(); }
@Override public void onStarted(FMLServerStartedEvent evt) { super.onStarted(evt); // This is a dummy to force ForgeHooks to be loaded, and initTools to be called to avoid an issue // on servers where tools aren't set until after we try to apply our ops. ForgeHooks.getCraftingPlayer(); // Only do this on the server, the client will do it when they connect CraftingHarmonicsMod.applyBaseSets(); }
@Mod.EventHandler public void runScript(FMLServerStartedEvent event) { try { runScript("user", false); } catch (CompileError e) { // ignored } }
@Mod.EventHandler public void serverStarted(FMLServerStartedEvent event) { // This removes the WorldBorder listeners that WorldServerMulti adds from other dimensions to the overworld border. // Thus this needs to be called after the static dimensions have loaded, ie. from this event specifically. WorldBorderUtils.removeDefaultBorderListeners(); // Register our custom (non-override) dimensions. This is in this event so that our custom dimensions // won't get auto-loaded on server start as 'static' dimensions. DimensionConfig.instance().registerNonOverrideDimensions(); GamemodeTracker.getInstance().readFromDisk(); }
@Mod.EventHandler public void onServerStarted(FMLServerStartedEvent event) { isOnServer = true; //isClient will be true if its an integrated server so it sets if (isClient) { Settings.copyClientToServer(); isClient = false; } }
@Mod.EventHandler public void onServerStarted(final FMLServerStartedEvent event) { Collection<ICommand> commands = FMLCommonHandler.instance().getMinecraftServerInstance().getCommandManager().getCommands().values(); for (final ICommand command : commands) { if (!(validCompareTo(command))) { log.warn("Command {} incorrectly overrides compareTo: %s", command.getName(), command.getClass().getName()); } } }
@EventHandler public void serverStarted(FMLServerStartedEvent event) { proxy.serverStarted(); }
@Mod.EventHandler @SideOnly(Side.SERVER) public void serverPostStart(FMLServerStartedEvent event) { WBCommand.checkRegistrations(SERVER); }
@Override public void serverStarted(FMLServerStartedEvent event) { super.serverStarted(event); }
@EventHandler public void serverStarted(FMLServerStartedEvent event) { logger.info(aboutMessage); }
public void serverStarted(FMLServerStartedEvent event) { for (DimensionalSettingsModifier modifier: modifiers.values()) { modifier.serverStarted(event); } }
@Override public void serverInit(FMLServerStartedEvent event) {}
public void onServerStart(FMLServerStartedEvent event) { proxy.serverInit(event); }
@Mod.EventHandler public void preServerStart(FMLServerStartedEvent event) { EnderStorageManager.reloadManager(false); }
public void onServerStarted(FMLServerStartedEvent event) { super.onServerStarted(event); MinecraftForge.EVENT_BUS.register(this); }
@Mod.EventHandler public void serverStarted(FMLServerStartedEvent event){ logger.info("Server started: " + event + " [TCINFO]"); TaleCraftGameRules.registerGameRules(FMLCommonHandler.instance().getMinecraftServerInstance().worldServerForDimension(0).getGameRules()); }
/** * Called from the main mod class to do stuff after the server was started. * On dedicated environments, this is executing server startup commands */ protected void serverStarted(FMLServerStartedEvent event) { this.handler.onStateEvent(event); PacketHandlerServer.executeStartupCommands(); }
@EventHandler @SideOnly(Side.SERVER) public void onServerStarted(FMLServerStartedEvent event) { slackConnect(); }
@EventHandler public void serverStarted(FMLServerStartedEvent event){ if(event.getSide().isServer()) tryNotifyServer(); }
@Mod.EventHandler public void onServerStarted(final FMLServerStartedEvent event) { this.commandManager.doRegister(MinecraftServer.getServer()); }
@Mod.EventHandler public void serverStarted(FMLServerStartedEvent event) { }
public void onStarted(FMLServerStartedEvent evt) { }
abstract public void serverStarted(FMLServerStartedEvent event);
void serverInit(FMLServerStartedEvent event);