From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Fri, 1 May 2020 17:39:02 +0300 Subject: [PATCH] Expose game version diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java index c043e6798314e322e32a1c8e8ef6a795e022b858..92bebf6f46cdd2ff5bc09af32e2d6d2ef0f4f45b 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -133,6 +133,18 @@ public final class Bukkit { return server.getBukkitVersion(); } + // Paper start - expose game version + /** + * Gets the version of game this server implements + * + * @return version of game + */ + @NotNull + public static String getMinecraftVersion() { + return server.getMinecraftVersion(); + } + // Paper end + /** * Gets a view of all currently logged in players. This {@linkplain * Collections#unmodifiableCollection(Collection) view} is a reused diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java index ad940c5d327c7e1e09aea7d2cee27a8abcf3fed7..f9b25ecf5642c30c04f5e0483a654ff33d1c188d 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -110,6 +110,16 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi @NotNull public String getBukkitVersion(); + // Paper start - expose game version + /** + * Gets the version of game this server implements + * + * @return version of game + */ + @NotNull + String getMinecraftVersion(); + // Paper end + /** * Gets a view of all currently logged in players. This {@linkplain * Collections#unmodifiableCollection(Collection) view} is a reused