@Mod.EventHandler @SideOnly(Side.SERVER) public void serverStart(FMLServerStartingEvent event) { if (INSTANCE == null) INSTANCE = this; if (SERVER == null) SERVER = event.getServer(); if (COMMAND == null) COMMAND = new WBCommand(); // Load (or create new) config files Config.load(false); // our one real command, though it does also have aliases "wb" and "worldborder" event.registerServerCommand(COMMAND); if ( Config.preventBlockPlace() ) enableBlockPlaceListener(true); if ( Config.preventMobSpawn() ) enableMobSpawnListener(true); if ( Config.getDenyEnderpearl() ) enableEnderPearlListener(true); DynMapFeatures.registerListener(); }
@EventHandler public static void onServerStart(FMLServerStartingEvent event) { log.info("Server Start"); proxy.serverStart(); Transformers.injectNewFillCmd(event.getServer()); if (isMapEnabled) { event.registerServerCommand(new CommandWaypoint(false)); event.registerServerCommand(new CommandWaypoint(true)); Minimap.init(new File(TomsModUtils.getSavedFile(), Reference.worldDirConfigName)); } if (Config.enableResearchSystem) event.registerServerCommand(new CommandResearch()); GlobalFields.EnderMemoryObj = new Object[][][][]{{new Object[65536][2]}, TomsModUtils.fillObject(65536)}; if (isCCLoaded) GlobalFields.EnderMemoryIComputerAccess.clear(); WorldHandler.onServerStart(new File(TomsModUtils.getSavedFile(), "chunkData")); PlayerHandler.onServerStart(new File(TomsModUtils.getSavedFile(), "playerData")); Config.printWarnings(); log.info("Loading Completed"); }
@EventHandler public void onServerStarting(FMLServerStartingEvent event) { ICommandManager manager = event.getServer().getCommandManager(); if (manager instanceof ServerCommandManager) { ((ServerCommandManager) manager).registerCommand(CommandManager.INSTANCE); } if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) { Progression.logger.log(Level.INFO, "How did a client get in the server start?"); return; } //Remap all relevant data, Loads in the server data RemappingHandler.reloadServerData(JSONLoader.getServerTabData(RemappingHandler.getHostName()), false); World world = FMLCommonHandler.instance().getMinecraftServerInstance().worldServers[0]; data = (PlayerSavedData) world.loadItemData(PlayerSavedData.class, MODNAME); if (data == null) { createWorldData(); } }
/** * Method for handling main registering call from FMLServerStartingEvent. * * @see FMLServerStartingEvent * * @param event FMLServerStartingEvent. */ public void registerCommands(FMLServerStartingEvent event) { timeLapse.resetStartTime(); HCoreLibMain.logHelper.info("Registering commands..."); if (event != null) { for (String commandName : commandMap.keySet()) { event.registerServerCommand(commandMap.get(commandName)); HCoreLibMain.logHelper.info("Command:", commandName, "was registered!"); } HCoreLibMain.logHelper.info("Finished registering commands successfully! (", timeLapse.getEffectiveTimeSince(), "ms )."); } else HCoreLibMain.logHelper.severe("Error registering commands... FMLServerStartingEvent is null!"); regComplete = true; }
@EventHandler public void serverStart(FMLServerStartingEvent event){ if(ForgeGenerator.getInstance() == null) { new ForgeGenerator(); } /* when playing singleplayer this lets us update Gens by restarting the world * instead of restarting the game */ GenManager genManager; //if(GenManager.getInstance() == null) { genManager = new GenManager(); /*} else { genManager = GenManager.getInstance(); }*/ Gen[] gens = FileHandler.parseAllGens(); if(gens != null) { for (int i = 0; i < gens.length; i++) { genManager.addGen(gens[i]); } } }
@EventHandler public void serverStarting(FMLServerStartingEvent event) { Iterator<CommandModule> modules = Iterators.forArray( new RegionCommands(), new OperationCommands(), new SessionCommands()); modules.forEachRemaining(m -> m.addCommands(event::registerServerCommand)); }
/** * Save the instance of the command manager and initialize the commands. * * @param event The server starting event that was fired. */ @EventHandler public void serverStarting(FMLServerStartingEvent event) { MinecraftServer server = event.getServer(); HueManager hueManager = HueManager.getInstance(); hueManager.setMinecraftServer(server); this.listener.setWorld(server.getEntityWorld()); this.commandManager = (ServerCommandManager) server.getCommandManager(); this.initCommands(); }
@Mod.EventHandler public void serverStarting(FMLServerStartingEvent event) { if (!CreeperHost.instance.active) return; event.registerServerCommand(new CommandInvite()); event.registerServerCommand(new CommandPregen()); deserializePreload(new File(getSaveFolder(), "pregenData.json")); }
@EventHandler public void init(FMLServerStartingEvent event) { event.registerServerCommand(new Pyramid()); event.registerServerCommand(new Stairs()); event.registerServerCommand(new Maze()); event.registerServerCommand(new Turtle()); event.registerServerCommand(new Cube()); event.registerServerCommand(new Frame()); event.registerServerCommand(new Line()); event.registerServerCommand(new Circle()); event.registerServerCommand(new FillCircle()); event.registerServerCommand(new Sphere()); event.registerServerCommand(new Face()); }
@EventHandler public void serverStarting(FMLServerStartingEvent event) { PacketHandler.NETWORKINSTANCE.registerMessage(PacketGetWorker.Handler.class, PacketGetWorker.class, PacketHandler.nextID(), Side.SERVER); PacketHandler.NETWORKINSTANCE.registerMessage(PacketReturnWorker.Handler.class, PacketReturnWorker.class, PacketHandler.nextID(), Side.CLIENT); event.registerServerCommand(new MainCmd()); event.registerServerCommand(new GamemodeCmd()); }
@Mod.EventHandler public void serverStart(FMLServerStartingEvent event) { event.registerServerCommand(new GetPlayersInChunk()); event.registerServerCommand(new GetPlayersInChunks()); if (Loader.isModLoaded("ftbu")) { event.registerServerCommand(new GetPlayersInClaimedChunks()); } }
@EventHandler public void serverStarting(FMLServerStartingEvent event) { World world = FMLCommonHandler.instance().getMinecraftServerInstance().getEntityWorld(); world.getGameRules().setOrCreateGameRule("teleportXP", "false"); }
@EventHandler public void serverLoad(FMLServerStartingEvent event) { this.worldFolder = event.getServer().getFolderName(); // Hand me that world name SaveHandler.loadFactionsFromFile(); }
@EventHandler public void serverLoad(FMLServerStartingEvent event) { this.worldDir = event.getServer().getFolderName(); // Hand me that world name _SaveData save = SaveHandler.loadFactionsFromFile(Main.configDir, Main.worldDir); if (save == null) { save = new _SaveData(); // Init } TerritoryHandler.setSaveData(save); }
public void serverStarting(FMLServerStartingEvent e) { e.registerServerCommand(new CommandHead()); e.registerServerCommand(new CommandSurvivalShortcut()); e.registerServerCommand(new CommandCreativeShortcut()); e.registerServerCommand(new CommandAdventureShortcut()); e.registerServerCommand(new CommandSpectatorShortcut()); e.registerServerCommand(new CommandSkull()); e.registerServerCommand(new CommandDimTeleport()); }
@EventHandler public void serverStarting(FMLServerStartingEvent event) { event.registerServerCommand(new CommandSimpleDimensions()); event.registerServerCommand(new CommandWeatherD()); event.registerServerCommand(new CommandTimeD()); event.registerServerCommand(new CommandTeleportD()); DimensionHandler.getInstance().loadDimensions(); }
@EventHandler public void serverLoad(FMLServerStartingEvent event) { server = event.getServer(); gameProfiles = new GameProfiles(server); event.registerServerCommand(new WolCommand()); event.registerServerCommand(new LuaCommand()); ChunkLoaderTicketSupport.enableTicketSupport(instance); }
@EventHandler public void serverStarting(FMLServerStartingEvent event) { /* Setting up the blacklist */ MorphManager.INSTANCE.setActiveBlacklist(MorphUtils.reloadBlacklist()); MorphManager.INSTANCE.setActiveSettings(MorphUtils.reloadMorphSettings()); /* Register commands */ event.registerServerCommand(new CommandMorph()); event.registerServerCommand(new CommandAcquireMorph()); event.registerServerCommand(new CommandMetamorph()); }
public static void initCommands(FMLServerStartingEvent event) { event.registerServerCommand(new CommandFriend()); event.registerServerCommand(new CommandFriendList()); event.registerServerCommand(new CommandRemoveFriend()); event.registerServerCommand(new CommandClearFriendList()); event.registerServerCommand(new CommandRestoreInventory()); event.registerServerCommand(new CommandDropInventory()); event.registerServerCommand(new CommandGetDeathList()); event.registerServerCommand(new CommandLoot()); }
public static void initCommands(FMLServerStartingEvent event) { event.registerServerCommand(new CommandFriend()); event.registerServerCommand(new CommandFriendList()); event.registerServerCommand(new CommandRemoveFriend()); event.registerServerCommand(new CommandClearFriendList()); event.registerServerCommand(new CommandRestoreInventory()); event.registerServerCommand(new CommandDropInventory()); }
@EventHandler public void onServerStarting(FMLServerStartingEvent event) { List<CommandBase> childCommands = Lists.newArrayList(); MinecraftForge.EVENT_BUS.post(new RegisterShearMadnessCommandEvent(childCommands)); event.registerServerCommand(new ShearMadnessCommand(childCommands)); }
public static ExtendedCommands getInstance(FMLServerStartingEvent event) { if (instance == null) { return new ExtendedCommands(event); } else { return instance; } }
@EventHandler public void onServerStart(FMLServerStartingEvent event) { registerCommands(event.getServer()); if (mtAvailable) { registerLoggers(); } }
@EventHandler public void serverLoad(FMLServerStartingEvent event) { waypointDB = new MexDB(DimensionManager.getCurrentSaveRootDirectory() .getPath() + File.separator + Reference.MODID, "waypoint"); waypointDB.autopush(true); //event.registerServerCommand(new HomeCommand("dex", "'setspawn', ")); event.registerServerCommand(new HomeCommand("home", "'set <name>', 'del <name>'")); event.registerServerCommand(new HomeCommand("spawn", "<world>")); }
@EventHandler public void serverStarting(FMLServerStartingEvent event) { String path = DimensionManager.getCurrentSaveRootDirectory() + "/blockbuster/models"; proxy.models.pack = proxy.getPack(); proxy.models.pack.addFolder(path); proxy.loadModels(proxy.models.pack); event.registerServerCommand(new CommandAction()); event.registerServerCommand(new CommandDirector()); event.registerServerCommand(new CommandRecord()); event.registerServerCommand(new CommandRecordSound()); }
@Mod.EventHandler public void serverStarting(FMLServerStartingEvent event) { //Register commands event.registerServerCommand(new CommandQuest()); event.registerServerCommand(new CommandHunterRank()); event.registerServerCommand(new CommandMonsters()); }
public static void init(FMLServerStartingEvent event) { LogHelper.finfo("Adding Commands"); //Can be disabled if(Configs.rainVoting){event.registerServerCommand(new CommandRainVote());} //Can't be disabled event.registerServerCommand(new CommandWorldInfo()); }
public void serverStarting(FMLServerStartingEvent event) { String clname = Utils.HANDLER.getClass().getName(); String expect = RefractionInternalHandler.class.getName(); if (!clname.equals(expect)) { new IllegalAccessError("The Refraction API internal method handler has been overriden. " + "This will cause the intended behavior of Refraction to be different than expected. " + "It's marked \"Do not Override\", anyway. Whoever the hell overrode it needs to go " + " back to primary school and learn to read. (Expected classname: " + expect + ", Actual classname: " + clname + ")").printStackTrace(); FMLCommonHandler.instance().exitJava(1, true); } }
@Mod.EventHandler @SuppressWarnings("unused") public void onServerStart(FMLServerStartingEvent event) { Account.clear(); minecraftServer = event.getServer(); File file = getWorldDir(minecraftServer.getEntityWorld()); if (file == null) return; Account.setLocation(new File(file, "EnderPay-accounts")); registerCommands(event); }
private void registerCommands(FMLServerStartingEvent event) { MinecraftServer server = event.getServer(); ICommandManager command = server.getCommandManager(); ServerCommandManager manager = (ServerCommandManager) command; manager.registerCommand(new CommandWallet()); manager.registerCommand(new CommandBalance()); manager.registerCommand(new CommandPay()); }
@Mod.EventHandler public void serverStarts(FMLServerStartingEvent event) { if (FMLCommonHandler.instance().getSide() == Side.CLIENT) { if (Core.dev_environ || Boolean.getBoolean("fz.registerDocCommands")) { event.registerServerCommand(new FzdocSerialize()); event.registerServerCommand(new ExportHtml()); } } }
@Mod.EventHandler public void serverStarting(FMLServerStartingEvent event){ MinecraftServer server = event.getServer(); ICommandManager cmdmng = server.getCommandManager(); if (cmdmng instanceof ServerCommandManager && cmdmng instanceof CommandHandler) { CommandHandler cmdhnd = (CommandHandler) cmdmng; TaleCraftCommands.register(cmdhnd); } // By calling this method, we create the ServerMirror for the given server. ServerHandler.getServerMirror(server); }
@EventHandler public void onServerStart(FMLServerStartingEvent evt) { MinecraftServer server = MinecraftServer.getServer(); ICommandManager command = server.getCommandManager(); ServerCommandManager manager = (ServerCommandManager) command; manager.registerCommand(new VintageCraftCommands()); }
@EventHandler public void serverStart(FMLServerStartingEvent event) { ICommandManager command = event.getServer().getCommandManager(); ServerCommandManager manager = (ServerCommandManager) command; manager.registerCommand(new UCCommand()); manager.registerCommand(new UCBalance()); manager.registerCommand(new UCRebalance()); manager.registerCommand(new UCGive()); manager.registerCommand(new UCSend()); }
/** * Called from the main mod class to handle the server start */ protected void serverInit(FMLServerStartingEvent event) { this.handler.onStateEvent(event); try { this.registerServerCommands(event.getServer()); this.mod.getLogger().info("Server Commands successfully registered"); } catch (Exception ex) {this.mod.getLogger().warn("Failed to register Server Command", ex);} if (MoreCommandsConfig.retryHandshake) PacketHandlerServer.startHandshakeRetryThread(); }
@EventHandler public void serverStart (FMLServerStartingEvent e) { e.registerServerCommand(new CommandLearnRecipe()); e.registerServerCommand(new CommandGiveMunny()); e.registerServerCommand(new CommandCheatMode()); e.registerServerCommand(new CommandRemoveKeychain()); e.registerServerCommand(new CommandResetLevel()); e.registerServerCommand(new CommandLevelUp()); e.registerServerCommand(new CommandDriveLevel()); e.registerServerCommand(new CommandShowHud()); e.registerServerCommand(new CommandDimension()); e.registerServerCommand(new CommandOpenKeychains()); logger.info("Commands loaded"); }
@EventHandler public void serverLoad(FMLServerStartingEvent event) { LapisWorld.serverLoad(event); LapisDimension.serverLoad(event); CoalWorld.serverLoad(event); CoalDimension.serverLoad(event); RedstoneWorld.serverLoad(event); RedstoneDimension.serverLoad(event); IronWorld.serverLoad(event); IronDimension.serverLoad(event); GoldWorld.serverLoad(event); GoldDimension.serverLoad(event); EmeraldWorld.serverLoad(event); EmeraldDimension.serverLoad(event); DiamondWorld.serverLoad(event); DiamondDimension.serverLoad(event); WoodWorld.serverLoad(event); WoodDimension.serverLoad(event); VoidWorld.serverLoad(event); VoidDimension.serverLoad(event); SnowWorld.serverLoad(event); SnowDimension.serverLoad(event); QuartzWorld.serverLoad(event); QuartzDimension.serverLoad(event); GlassWorld.serverLoad(event); GlassDimension.serverLoad(event); ObsidianWorld.serverLoad(event); LapisIgniter.serverLoad(event); CoalIgniter.serverLoad(event); RedstoneIgniter.serverLoad(event); IronIgniter.serverLoad(event); GoldIgniter.serverLoad(event); DiamondIgniter.serverLoad(event); EmeraldIgniter.serverLoad(event); WoodIgniter.serverLoad(event); VoidIgniter.serverLoad(event); ObsidianDimension.serverLoad(event); ObsidianIgniter.serverLoad(event); }
@EventHandler public void serverStarting (FMLServerStartingEvent event) { for (final ICommand command : BookshelfRegistry.getCommands()) { event.registerServerCommand(command); } }
@EventHandler public void serverStart(FMLServerStartingEvent event) { MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance(); ICommandManager command = server.getCommandManager(); ServerCommandManager serverCommand = (ServerCommandManager) command; serverCommand.registerCommand(new CommandKills()); serverCommand.registerCommand(new CommandShowKills()); serverCommand.registerCommand(new CommandSetBase()); serverCommand.registerCommand(new CommandEditMode()); }
@EventHandler public void serverStart(FMLServerStartingEvent event) { //MinecraftServer server = MinecraftServer.getServer(); //ICommandManager command = server.getCommandManager(); //ServerCommandManager manager = (ServerCommandManager) command; // manager.registerCommand(new CommandPhysics()); }