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 efcbc1e667fab15a55fe44b234dc9713aec895f2..ba49dfc7547da0e1e408c2afc70b1f42a1beb76c 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -118,6 +118,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 b666d5f03bfb5cc91570688382f541498dd1a1c5..2b21ffb60312cdd2033096b52155610b689f3294 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -97,6 +97,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