2020-05-06 11:48:49 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2020-05-02 10:56:08 +02:00
|
|
|
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
|
2020-06-27 23:37:09 +02:00
|
|
|
index 600334831293793840511992048c43bff1febc24..c0421b5a09c25ad4f23387b8b0e035871a9d367b 100644
|
2020-05-02 10:56:08 +02:00
|
|
|
--- 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
|
2020-06-27 23:37:09 +02:00
|
|
|
index f44a582e954625a12b19d4e142865e5d3154edd5..0ad848c42039eeed64cc0b8372d3a9331e61d286 100644
|
2020-05-02 10:56:08 +02:00
|
|
|
--- 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 {
|
|
|
|
@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
|