本文整理汇总了Java中net.minecraftforge.fml.common.event.FMLServerStartedEvent类的典型用法代码示例。如果您正苦于以下问题:Java FMLServerStartedEvent类的具体用法?Java FMLServerStartedEvent怎么用?Java FMLServerStartedEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FMLServerStartedEvent类属于net.minecraftforge.fml.common.event包,在下文中一共展示了FMLServerStartedEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例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);
}
}
示例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());
}
示例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);
}
示例5: serverInit
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@Override
public void serverInit(FMLServerStartedEvent event)
{
if (!creativeBlock.config().enableDynmapSupport)
{
return;
}
dynmapSupport.copyTextures();
}
示例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();
}
示例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
}
}
示例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();
}
示例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;
}
}
示例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());
}
}
}
示例11: serverStarted
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@EventHandler
public void serverStarted(FMLServerStartedEvent event)
{
proxy.serverStarted();
}
示例12: serverPostStart
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@Mod.EventHandler
@SideOnly(Side.SERVER)
public void serverPostStart(FMLServerStartedEvent event)
{
WBCommand.checkRegistrations(SERVER);
}
示例13: serverStarted
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@Override
public void serverStarted(FMLServerStartedEvent event) {
super.serverStarted(event);
}
示例14: serverStarted
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@EventHandler
public void serverStarted(FMLServerStartedEvent event) {
logger.info(aboutMessage);
}
示例15: serverStarted
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
public void serverStarted(FMLServerStartedEvent event) {
for (DimensionalSettingsModifier modifier: modifiers.values()) {
modifier.serverStarted(event);
}
}