Java 类net.minecraftforge.fml.common.event.FMLServerStartedEvent 实例源码

项目:Halloween    文件:HalloweenMod.java   
@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);
    }
}
项目:TechnicalDimensions    文件:ModDimensions.java   
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);
    }
}
项目:GriefGuardian    文件:GriefGuardian.java   
@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());
}
项目:wizards-of-lua    文件:WolTestEnvironment.java   
@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);
}
项目:CreativeBlock    文件:ServerProxy.java   
@Override
public void serverInit(FMLServerStartedEvent event)
{
    if (!creativeBlock.config().enableDynmapSupport)
    {
        return;
    }
    dynmapSupport.copyTextures();
}
项目:CraftingHarmonics    文件:ServerProxy.java   
@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();
}
项目:Factorization    文件:ScrapManager.java   
@Mod.EventHandler
public void runScript(FMLServerStartedEvent event) {
    try {
        runScript("user", false);
    } catch (CompileError e) {
        // ignored
    }
}
项目:justenoughdimensions    文件:JustEnoughDimensions.java   
@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();
}
项目:sprinkles_for_vanilla    文件:SprinklesForVanilla.java   
@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;
    }
}
项目:HelpFixer    文件:HelpFixer.java   
@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());
        }
    }
}
项目:EmergentVillages    文件:EmergentVillages.java   
@EventHandler
public void serverStarted(FMLServerStartedEvent event)
{
    proxy.serverStarted();
}
项目:World-Border    文件:WorldBorder.java   
@Mod.EventHandler
@SideOnly(Side.SERVER)
public void serverPostStart(FMLServerStartedEvent event)
{
    WBCommand.checkRegistrations(SERVER);
}
项目:ForgeAdmin    文件:ClientProxy.java   
@Override
public void serverStarted(FMLServerStartedEvent event) {
  super.serverStarted(event);
}
项目:wizards-of-lua    文件:WizardsOfLua.java   
@EventHandler
public void serverStarted(FMLServerStartedEvent event) {
  logger.info(aboutMessage);
}
项目:Geographicraft    文件:DimensionalSettingsRegistry.java   
public void serverStarted(FMLServerStartedEvent event) {
    for (DimensionalSettingsModifier modifier: modifiers.values()) {
        modifier.serverStarted(event);
    }
}
项目:CreativeBlock    文件:ClientProxy.java   
@Override
public void serverInit(FMLServerStartedEvent event)
{}
项目:CreativeBlock    文件:CreativeBlock.java   
public void onServerStart(FMLServerStartedEvent event)
{
    proxy.serverInit(event);
}
项目:EnderStorage    文件:EnderStorage.java   
@Mod.EventHandler
public void preServerStart(FMLServerStartedEvent event) {
    EnderStorageManager.reloadManager(false);
}
项目:TFICore    文件:ClientProxy.java   
public void onServerStarted(FMLServerStartedEvent event) {
    super.onServerStarted(event);
    MinecraftForge.EVENT_BUS.register(this);
}
项目:TaleCraft    文件:TaleCraft.java   
@Mod.EventHandler
public void serverStarted(FMLServerStartedEvent event){
    logger.info("Server started: " + event + " [TCINFO]");
    TaleCraftGameRules.registerGameRules(FMLCommonHandler.instance().getMinecraftServerInstance().worldServerForDimension(0).getGameRules());
}
项目:morecommands    文件:CommonProxy.java   
/**
 * 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();
}
项目:SlackMC    文件:Slack.java   
@EventHandler
@SideOnly(Side.SERVER)
public void onServerStarted(FMLServerStartedEvent event)
{
    slackConnect();
}
项目:IngameAccountSwitcher    文件:VersionChecker.java   
@EventHandler
public void serverStarted(FMLServerStartedEvent event){
    if(event.getSide().isServer())
        tryNotifyServer();
}
项目:ServerTools-CORE    文件:ServerToolsCore.java   
@Mod.EventHandler
public void onServerStarted(final FMLServerStartedEvent event) {
    this.commandManager.doRegister(MinecraftServer.getServer());
}
项目:Hats    文件:Hats.java   
@Mod.EventHandler
public void serverStarted(FMLServerStartedEvent event)
{
}
项目:CraftingHarmonics    文件:CommonProxy.java   
public void onStarted(FMLServerStartedEvent evt) {

    }
项目:Geographicraft    文件:DimensionalSettingsModifier.java   
abstract public void serverStarted(FMLServerStartedEvent event);
项目:CreativeBlock    文件:Proxy.java   
void serverInit(FMLServerStartedEvent event);