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 4e8383432a3a8a07dbc31f77986b0f4790779f7d..29cf7359334144d6e718fed560771be35f580b16 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -158,6 +158,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 37caeff1416cf0e3c63260ba7ad82a92e95a5399..d97200a8816dbbbce07734b5547a942f8f3f0fdc 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -116,6 +116,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