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 803ca460cf91f6760d7b16e1310a23d6b09725b3..377e9979c5bbc50398d521ff038956f80d7376b1 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -159,6 +159,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 1575218ee7eb563b17b542b578c10d125889a7be..7ed98561c6320132501c89d70254870e6ec03e77 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -117,6 +117,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