本文整理汇总了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);
}
示例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"));
}
示例3: getWarningState
import org.bukkit.Warning.WarningState; //导入依赖的package包/类
@Override
public WarningState getWarningState() {
return warningState;
}
示例4: getWarningState
import org.bukkit.Warning.WarningState; //导入依赖的package包/类
@Override
public WarningState getWarningState()
{
// TODO Auto-generated method stub
throw new UnimplementedOperationException();
}
示例5: getWarningState
import org.bukkit.Warning.WarningState; //导入依赖的package包/类
@Override
public WarningState getWarningState() {
// TODO Auto-generated method stub
return null;
}
示例6: getWarningState
import org.bukkit.Warning.WarningState; //导入依赖的package包/类
/**
* @see Server#getWarningState()
*/
public static WarningState getWarningState() {
return server.getWarningState();
}
示例7: getWarningState
import org.bukkit.Warning.WarningState; //导入依赖的package包/类
@Override
public WarningState getWarningState() {
return WarningState.DEFAULT;
}
示例8: getWarningState
import org.bukkit.Warning.WarningState; //导入依赖的package包/类
public WarningState getWarningState() {
return warnState;
}
示例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);
}