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
|
2023-07-04 10:22:56 +02:00
|
|
|
index e54ba870293676f16fabac5b91ffd7202d3a17e0..eb1e5e87d003e5cd7fbf4a01265ef30bb87abd47 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
|
2023-07-04 10:22:56 +02:00
|
|
|
@@ -157,6 +157,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
|
2023-07-04 10:22:56 +02:00
|
|
|
index e4d7c0a3c36a34ef5bdb728d52cf0c4f2aa3ef77..4ec70d58f4341e9fe9467f2b3a65b9808a3d81a4 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
|
2023-07-04 10:22:56 +02:00
|
|
|
@@ -115,6 +115,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
|