2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
|
|
|
|
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
|
2022-06-08 18:13:02 +02:00
|
|
|
index 3455de478517a91285bb9d1b306ce1c4be619389..706e42172b938840c6ec06f0f7b686eee17a4a93 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
2022-06-08 18:13:02 +02:00
|
|
|
@@ -154,6 +154,18 @@ public final class Bukkit {
|
2021-06-11 14:02:28 +02:00
|
|
|
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
|
2022-06-07 19:03:07 +02:00
|
|
|
index d59a7e0c9ec50040fb0b2cc3239cae46760aba04..9b2c1eb7e215a9227c60bc85906fed33ec1dd60a 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
2022-02-12 14:20:33 +01:00
|
|
|
@@ -112,6 +112,16 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
2021-06-11 14:02:28 +02:00
|
|
|
@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
|