当前位置: 首页>>代码示例>>Java>>正文


Java WarningState类代码示例

本文整理汇总了Java中org.bukkit.Warning.WarningState的典型用法代码示例。如果您正苦于以下问题:Java WarningState类的具体用法?Java WarningState怎么用?Java WarningState使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


WarningState类属于org.bukkit.Warning包,在下文中一共展示了WarningState类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkSaveState

import org.bukkit.Warning.WarningState; //导入依赖的package包/类
public void checkSaveState() {
    if (this.playerCommandState || this.printSaveWarning || this.console.autosavePeriod <= 0) {
        return;
    }
    this.printSaveWarning = true;
    getLogger().log(Level.WARNING, "A manual (plugin-induced) save has been detected while server is configured to auto-save. This may affect performance.", warningState == WarningState.ON ? new Throwable() : null);
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:8,代码来源:CraftServer.java

示例2: initialize

import org.bukkit.Warning.WarningState; //导入依赖的package包/类
/**
 * @deprecated This method is legacy and will be removed - it must be
 *     replaced by the specially provided constructor(s).
 */
@Deprecated
protected final void initialize(PluginLoader loader, Server server, PluginDescriptionFile description, File dataFolder, File file, ClassLoader classLoader) {
    if (server.getWarningState() == WarningState.OFF) {
        return;
    }
    getLogger().log(Level.WARNING, getClass().getName() + " is already initialized", server.getWarningState() == WarningState.DEFAULT ? null : new AuthorNagException("Explicit initialization"));
}
 
开发者ID:CyberdyneCC,项目名称:Thermos-Bukkit,代码行数:12,代码来源:JavaPlugin.java

示例3: getWarningState

import org.bukkit.Warning.WarningState; //导入依赖的package包/类
@Override
public WarningState getWarningState() {
    return warningState;
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:5,代码来源:CraftServer.java

示例4: getWarningState

import org.bukkit.Warning.WarningState; //导入依赖的package包/类
@Override
public WarningState getWarningState()
{
	// TODO Auto-generated method stub
	throw new UnimplementedOperationException();
}
 
开发者ID:seeseemelk,项目名称:MockBukkit,代码行数:7,代码来源:ServerMock.java

示例5: getWarningState

import org.bukkit.Warning.WarningState; //导入依赖的package包/类
@Override
public WarningState getWarningState() {
	// TODO Auto-generated method stub
	return null;
}
 
开发者ID:netherrack,项目名称:netherrack,代码行数:6,代码来源:NetherServer.java

示例6: getWarningState

import org.bukkit.Warning.WarningState; //导入依赖的package包/类
/**
 * @see Server#getWarningState()
 */
public static WarningState getWarningState() {
    return server.getWarningState();
}
 
开发者ID:CyberdyneCC,项目名称:Thermos-Bukkit,代码行数:7,代码来源:Bukkit.java

示例7: getWarningState

import org.bukkit.Warning.WarningState; //导入依赖的package包/类
@Override
public WarningState getWarningState() {
	return WarningState.DEFAULT;
}
 
开发者ID:DevotedMC,项目名称:ExilePearl,代码行数:5,代码来源:TestServer.java

示例8: getWarningState

import org.bukkit.Warning.WarningState; //导入依赖的package包/类
public WarningState getWarningState() {
    return warnState;
}
 
开发者ID:CanaryBukkitTeam,项目名称:CanaryBukkit,代码行数:4,代码来源:CanaryServer.java

示例9: CraftServer

import org.bukkit.Warning.WarningState; //导入依赖的package包/类
public CraftServer(MinecraftServer console, PlayerList playerList) {
    this.console = console;
    this.playerList = (DedicatedPlayerList) playerList;
    this.playerView = Collections.unmodifiableList(Lists.transform(playerList.players, new Function<EntityPlayer, CraftPlayer>() {
        @Override
        public CraftPlayer apply(EntityPlayer player) {
            return player.getBukkitEntity();
        }
    }));
    this.serverVersion = CraftServer.class.getPackage().getImplementationVersion();
    online.value = console.getPropertyManager().getBoolean("online-mode", true);

    Bukkit.setServer(this);

    // Register all the Enchantments and PotionTypes now so we can stop new registration immediately after
    Enchantment.DAMAGE_ALL.getClass();
    org.bukkit.enchantments.Enchantment.stopAcceptingRegistrations();

    Potion.setPotionBrewer(new CraftPotionBrewer());
    MobEffectList.BLINDNESS.getClass();
    PotionEffectType.stopAcceptingRegistrations();
    // Ugly hack :(

    if (!Main.useConsole) {
        getLogger().info("Console input is disabled due to --noconsole command argument");
    }

    configuration = YamlConfiguration.loadConfiguration(getConfigFile());
    configuration.options().copyDefaults(true);
    configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(getClass().getClassLoader().getResourceAsStream("configurations/bukkit.yml"), Charsets.UTF_8)));
    ConfigurationSection legacyAlias = null;
    if (!configuration.isString("aliases")) {
        legacyAlias = configuration.getConfigurationSection("aliases");
        configuration.set("aliases", "now-in-commands.yml");
    }
    saveConfig();
    if (getCommandsConfigFile().isFile()) {
        legacyAlias = null;
    }
    commandsConfiguration = YamlConfiguration.loadConfiguration(getCommandsConfigFile());
    commandsConfiguration.options().copyDefaults(true);
    commandsConfiguration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(getClass().getClassLoader().getResourceAsStream("configurations/commands.yml"), Charsets.UTF_8)));
    saveCommandsConfig();

    // Migrate aliases from old file and add previously implicit $1- to pass all arguments
    if (legacyAlias != null) {
        ConfigurationSection aliases = commandsConfiguration.createSection("aliases");
        for (String key : legacyAlias.getKeys(false)) {
            ArrayList<String> commands = new ArrayList<String>();

            if (legacyAlias.isList(key)) {
                for (String command : legacyAlias.getStringList(key)) {
                    commands.add(command + " $1-");
                }
            } else {
                commands.add(legacyAlias.getString(key) + " $1-");
            }

            aliases.set(key, commands);
        }
    }

    saveCommandsConfig();
    overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
    ((SimplePluginManager) pluginManager).useTimings(configuration.getBoolean("settings.plugin-profiling"));
    monsterSpawn = configuration.getInt("spawn-limits.monsters");
    animalSpawn = configuration.getInt("spawn-limits.animals");
    waterAnimalSpawn = configuration.getInt("spawn-limits.water-animals");
    ambientSpawn = configuration.getInt("spawn-limits.ambient");
    console.autosavePeriod = configuration.getInt("ticks-per.autosave");
    warningState = WarningState.value(configuration.getString("settings.deprecated-verbose"));
    chunkGCPeriod = configuration.getInt("chunk-gc.period-in-ticks");
    chunkGCLoadThresh = configuration.getInt("chunk-gc.load-threshold");
    loadIcon();

    loadPlugins();
    enablePlugins(PluginLoadOrder.STARTUP);
}
 
开发者ID:Techcable,项目名称:DiffUtils,代码行数:79,代码来源:CraftServer_188.java


注:本文中的org.bukkit.Warning.WarningState类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。