summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2015-01-25 10:31:31 +1100
committermd_5 <git@md-5.net>2015-01-25 10:31:31 +1100
commit0d52f683db2cc482636355dc2e954fa87060a270 (patch)
tree14971f63d067051080d2c2ed0e77fd1e3c3cf99c /src/main/java/org/bukkit
parentec4ddfb22ef4809dc9cf4fffb32fa3c4dcaeb8a0 (diff)
downloadcraftbukkit-0d52f683db2cc482636355dc2e954fa87060a270.tar
craftbukkit-0d52f683db2cc482636355dc2e954fa87060a270.tar.gz
craftbukkit-0d52f683db2cc482636355dc2e954fa87060a270.tar.lz
craftbukkit-0d52f683db2cc482636355dc2e954fa87060a270.tar.xz
craftbukkit-0d52f683db2cc482636355dc2e954fa87060a270.zip
SPIGOT-469: Increment and print reload count.
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftCrashReport.java1
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftServer.java2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftCrashReport.java b/src/main/java/org/bukkit/craftbukkit/CraftCrashReport.java
index e08afce5..89983726 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftCrashReport.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftCrashReport.java
@@ -24,6 +24,7 @@ public class CraftCrashReport implements Callable<Object> {
value.append(' ').append(description.getFullName()).append(' ').append(description.getMain()).append(' ').append(Arrays.toString(description.getAuthors().toArray())).append(',');
}
value.append("}\n Warnings: ").append(Bukkit.getWarningState().name());
+ value.append("\n Reload Count: ").append(String.valueOf(MinecraftServer.getServer().server.reloadCount));
value.append("\n Threads: {");
for (Map.Entry<Thread, ? extends Object[]> entry : Thread.getAllStackTraces().entrySet()) {
value.append(' ').append(entry.getKey().getState().name()).append(' ').append(entry.getKey().getName()).append(": ").append(Arrays.toString(entry.getValue())).append(',');
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b4ad7d1e..1f936b04 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -161,6 +161,7 @@ public final class CraftServer implements Server {
private final Pattern validUserPattern = Pattern.compile("^[a-zA-Z0-9_]{2,16}$");
private final UUID invalidUserUUID = UUID.nameUUIDFromBytes("InvalidUsername".getBytes(Charsets.UTF_8));
private final List<CraftPlayer> playerView;
+ public int reloadCount;
private final class BooleanWrapper {
private boolean value = true;
@@ -636,6 +637,7 @@ public final class CraftServer implements Server {
@Override
public void reload() {
+ reloadCount++;
configuration = YamlConfiguration.loadConfiguration(getConfigFile());
commandsConfiguration = YamlConfiguration.loadConfiguration(getCommandsConfigFile());
PropertyManager config = new PropertyManager(console.options);