summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWesley Wolfe <weswolf@aol.com>2012-08-06 23:52:49 -0500
committerWesley Wolfe <weswolf@aol.com>2012-08-06 23:52:49 -0500
commit2bb7a5f94d399498dc1ce976c709acc07fb4dd00 (patch)
tree79c3ff5df753072d490b2df6eef1598f53e81d5d /src
parentbfbdbbd05cf4664c2558940e36d37c4d3be1f3af (diff)
downloadcraftbukkit-2bb7a5f94d399498dc1ce976c709acc07fb4dd00.tar
craftbukkit-2bb7a5f94d399498dc1ce976c709acc07fb4dd00.tar.gz
craftbukkit-2bb7a5f94d399498dc1ce976c709acc07fb4dd00.tar.lz
craftbukkit-2bb7a5f94d399498dc1ce976c709acc07fb4dd00.tar.xz
craftbukkit-2bb7a5f94d399498dc1ce976c709acc07fb4dd00.zip
Implement new deprecated warning state configuration option
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftServer.java9
-rw-r--r--src/main/resources/configurations/bukkit.yml1
2 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 7b755418..500c4909 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -53,6 +53,7 @@ import org.bukkit.ChatColor;
import org.bukkit.GameMode;
import org.bukkit.OfflinePlayer;
import org.bukkit.Server;
+import org.bukkit.Warning.WarningState;
import org.bukkit.World;
import org.bukkit.World.Environment;
import org.bukkit.WorldCreator;
@@ -110,7 +111,6 @@ import org.bukkit.plugin.messaging.Messenger;
import org.bukkit.potion.Potion;
import org.bukkit.potion.PotionEffectType;
import org.bukkit.plugin.messaging.StandardMessenger;
-import org.bukkit.scheduler.BukkitScheduler;
import org.bukkit.scheduler.BukkitWorker;
import org.bukkit.util.permissions.DefaultPermissions;
@@ -152,6 +152,7 @@ public final class CraftServer implements Server {
private int animalSpawn = -1;
private int waterAnimalSpawn = -1;
private File container;
+ private WarningState warningState = WarningState.DEFAULT;
static {
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
@@ -185,6 +186,7 @@ public final class CraftServer implements Server {
monsterSpawn = configuration.getInt("spawn-limits.monsters");
animalSpawn = configuration.getInt("spawn-limits.animals");
waterAnimalSpawn = configuration.getInt("spawn-limits.water-animals");
+ warningState = WarningState.value(configuration.getString("settings.deprecated-verbose"));
updater = new AutoUpdater(new BukkitDLUpdaterService(configuration.getString("auto-updater.host")), getLogger(), configuration.getString("auto-updater.preferred-channel"));
updater.setEnabled(configuration.getBoolean("auto-updater.enabled"));
@@ -514,6 +516,7 @@ public final class CraftServer implements Server {
monsterSpawn = configuration.getInt("spawn-limits.monsters");
animalSpawn = configuration.getInt("spawn-limits.animals");
waterAnimalSpawn = configuration.getInt("spawn-limits.water-animals");
+ warningState = WarningState.value(configuration.getString("settings.deprecated-verbose"));
for (WorldServer world : console.worlds) {
world.difficulty = difficulty;
@@ -1220,4 +1223,8 @@ public final class CraftServer implements Server {
public String getMotd() {
return console.getMotd();
}
+
+ public WarningState getWarningState() {
+ return warningState;
+ }
}
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
index 5d250118..486dbbc7 100644
--- a/src/main/resources/configurations/bukkit.yml
+++ b/src/main/resources/configurations/bukkit.yml
@@ -24,6 +24,7 @@ settings:
plugin-profiling: false
connection-throttle: 4000
query-plugins: true
+ deprecated-verbose: default
spawn-limits:
monsters: 70
animals: 15