本文整理汇总了Java中net.minecraftforge.fml.common.event.FMLServerStartedEvent类的典型用法代码示例。如果您正苦于以下问题:Java FMLServerStartedEvent类的具体用法?Java FMLServerStartedEvent怎么用?Java FMLServerStartedEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FMLServerStartedEvent类属于net.minecraftforge.fml.common.event包,在下文中一共展示了FMLServerStartedEvent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onServerStarted
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@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);
}
}
开发者ID:crazysnailboy,项目名称:Halloween,代码行数:23,代码来源:HalloweenMod.java
示例2: worldLoad
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
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);
}
}
开发者ID:modmuss50,项目名称:TechnicalDimensions,代码行数:22,代码来源:ModDimensions.java
示例3: onServerStarting
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@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());
}
开发者ID:Mithion,项目名称:GriefGuardian,代码行数:21,代码来源:GriefGuardian.java
示例4: serverStarted
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@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);
}
开发者ID:wizards-of-lua,项目名称:wizards-of-lua,代码行数:10,代码来源:WolTestEnvironment.java
示例5: serverInit
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@Override
public void serverInit(FMLServerStartedEvent event)
{
if (!creativeBlock.config().enableDynmapSupport)
{
return;
}
dynmapSupport.copyTextures();
}
开发者ID:dags-,项目名称:CreativeBlock,代码行数:10,代码来源:ServerProxy.java
示例6: onStarted
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@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();
}
开发者ID:legendblade,项目名称:CraftingHarmonics,代码行数:12,代码来源:ServerProxy.java
示例7: runScript
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@Mod.EventHandler
public void runScript(FMLServerStartedEvent event) {
try {
runScript("user", false);
} catch (CompileError e) {
// ignored
}
}
开发者ID:purpleposeidon,项目名称:Factorization,代码行数:9,代码来源:ScrapManager.java
示例8: serverStarted
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@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();
}
开发者ID:maruohon,项目名称:justenoughdimensions,代码行数:14,代码来源:JustEnoughDimensions.java
示例9: onServerStarted
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@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;
}
}
开发者ID:VikeStep,项目名称:sprinkles_for_vanilla,代码行数:12,代码来源:SprinklesForVanilla.java
示例10: onServerStarted
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@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());
}
}
}
开发者ID:matthewprenger,项目名称:HelpFixer,代码行数:11,代码来源:HelpFixer.java
示例11: serverStarted
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@EventHandler
public void serverStarted(FMLServerStartedEvent event)
{
proxy.serverStarted();
}
开发者ID:Edicatad,项目名称:EmergentVillages,代码行数:6,代码来源:EmergentVillages.java
示例12: serverPostStart
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@Mod.EventHandler
@SideOnly(Side.SERVER)
public void serverPostStart(FMLServerStartedEvent event)
{
WBCommand.checkRegistrations(SERVER);
}
开发者ID:abused,项目名称:World-Border,代码行数:7,代码来源:WorldBorder.java
示例13: serverStarted
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@Override
public void serverStarted(FMLServerStartedEvent event) {
super.serverStarted(event);
}
开发者ID:ForgeAdmin,项目名称:ForgeAdmin,代码行数:5,代码来源:ClientProxy.java
示例14: serverStarted
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@EventHandler
public void serverStarted(FMLServerStartedEvent event) {
logger.info(aboutMessage);
}
开发者ID:wizards-of-lua,项目名称:wizards-of-lua,代码行数:5,代码来源:WizardsOfLua.java
示例15: serverStarted
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
public void serverStarted(FMLServerStartedEvent event) {
for (DimensionalSettingsModifier modifier: modifiers.values()) {
modifier.serverStarted(event);
}
}
开发者ID:Zeno410,项目名称:Geographicraft,代码行数:6,代码来源:DimensionalSettingsRegistry.java
示例16: serverInit
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@Override
public void serverInit(FMLServerStartedEvent event)
{}
开发者ID:dags-,项目名称:CreativeBlock,代码行数:4,代码来源:ClientProxy.java
示例17: onServerStart
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
public void onServerStart(FMLServerStartedEvent event)
{
proxy.serverInit(event);
}
开发者ID:dags-,项目名称:CreativeBlock,代码行数:5,代码来源:CreativeBlock.java
示例18: preServerStart
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@Mod.EventHandler
public void preServerStart(FMLServerStartedEvent event) {
EnderStorageManager.reloadManager(false);
}
开发者ID:TheCBProject,项目名称:EnderStorage,代码行数:5,代码来源:EnderStorage.java
示例19: onServerStarted
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
public void onServerStarted(FMLServerStartedEvent event) {
super.onServerStarted(event);
MinecraftForge.EVENT_BUS.register(this);
}
开发者ID:fabbe50,项目名称:TFICore,代码行数:5,代码来源:ClientProxy.java
示例20: serverStarted
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@Mod.EventHandler
public void serverStarted(FMLServerStartedEvent event){
logger.info("Server started: " + event + " [TCINFO]");
TaleCraftGameRules.registerGameRules(FMLCommonHandler.instance().getMinecraftServerInstance().worldServerForDimension(0).getGameRules());
}
开发者ID:tiffit,项目名称:TaleCraft,代码行数:6,代码来源:TaleCraft.java
注:本文中的net.minecraftforge.fml.common.event.FMLServerStartedEvent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论