diff options
author | Nathan Adams <dinnerbone@dinnerbone.com> | 2011-11-05 23:58:13 +0000 |
---|---|---|
committer | Erik Broes <erikbroes@ripe.net> | 2011-11-20 00:01:57 -0800 |
commit | 246ff3b35254f89e00d0bbe7d33570fd60fb2b3b (patch) | |
tree | 54f04e8fb51bc2b940556c3df540d679882b931c /src/main | |
parent | 345ea36c7bb3383c6e4825355d0043a646194eaa (diff) | |
download | craftbukkit-246ff3b35254f89e00d0bbe7d33570fd60fb2b3b.tar craftbukkit-246ff3b35254f89e00d0bbe7d33570fd60fb2b3b.tar.gz craftbukkit-246ff3b35254f89e00d0bbe7d33570fd60fb2b3b.tar.lz craftbukkit-246ff3b35254f89e00d0bbe7d33570fd60fb2b3b.tar.xz craftbukkit-246ff3b35254f89e00d0bbe7d33570fd60fb2b3b.zip |
Made the new Status info list plugins (test it out at http://dinnerbone.com/minecraft/tools/status/ )
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/net/minecraft/server/MinecraftServer.java | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index f4c2fb5b..c532593f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -29,6 +29,7 @@ import org.bukkit.event.world.WorldInitEvent; import org.bukkit.event.world.WorldLoadEvent; import org.bukkit.event.world.WorldSaveEvent; import org.bukkit.generator.ChunkGenerator; +import org.bukkit.plugin.Plugin; import org.bukkit.plugin.PluginLoadOrder; // CraftBukkit end @@ -658,7 +659,30 @@ public class MinecraftServer implements Runnable, ICommandListener, IMinecraftSe } public String getPlugins() { - return ""; + // CraftBukkit start - whole method + StringBuilder result = new StringBuilder(); + Plugin[] plugins = server.getPluginManager().getPlugins(); + + result.append(server.getName()); + result.append(" on Bukkit "); + result.append(server.getBukkitVersion()); + + if (plugins.length > 0) { + result.append(": "); + + for (int i = 0; i < plugins.length; i++) { + if (i > 0) { + result.append("; "); + } + + result.append(plugins[i].getDescription().getName()); + result.append(" "); + result.append(plugins[i].getDescription().getVersion().replaceAll(";", ",")); + } + } + + return result.toString(); + // CraftBukkit end } public void o() {} @@ -670,7 +694,7 @@ public class MinecraftServer implements Runnable, ICommandListener, IMinecraftSe } public boolean isDebugging() { - return false; + return this.propertyManager.getBoolean("debug", false); // CraftBukkit - don't hardcode } public void severe(String s) { |