From 51b8a856bb25c896848403a245f63b44f15e9fad Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Mon, 31 Oct 2011 04:01:56 +0000 Subject: [PATCH] Added getBukkitVersion to Server By: Nathan Adams --- paper-api/src/main/java/org/bukkit/Bukkit.java | 6 +++++- paper-api/src/main/java/org/bukkit/Server.java | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/paper-api/src/main/java/org/bukkit/Bukkit.java b/paper-api/src/main/java/org/bukkit/Bukkit.java index c9fc8d7e8b..45728ccf3b 100644 --- a/paper-api/src/main/java/org/bukkit/Bukkit.java +++ b/paper-api/src/main/java/org/bukkit/Bukkit.java @@ -51,7 +51,7 @@ public final class Bukkit { } Bukkit.server = server; - server.getLogger().info("This server is running " + getName() + " version " + getVersion()); + server.getLogger().info("This server is running " + getName() + " version " + getVersion() + " (Implementing API version " + getBukkitVersion() + ")"); } public static String getName() { @@ -62,6 +62,10 @@ public final class Bukkit { return server.getVersion(); } + public static String getBukkitVersion() { + return server.getBukkitVersion(); + } + public static Player[] getOnlinePlayers() { return server.getOnlinePlayers(); } diff --git a/paper-api/src/main/java/org/bukkit/Server.java b/paper-api/src/main/java/org/bukkit/Server.java index ca71d8d43e..3870bd80f2 100644 --- a/paper-api/src/main/java/org/bukkit/Server.java +++ b/paper-api/src/main/java/org/bukkit/Server.java @@ -53,6 +53,13 @@ public interface Server { * @return version of this server implementation */ public String getVersion(); + + /** + * Gets the Bukkit version that this server is running. + * + * @return Version of Bukkit + */ + public String getBukkitVersion(); /** * Gets a list of all currently logged in players