mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 02:55:47 +01:00
51 lines
1.8 KiB
Diff
51 lines
1.8 KiB
Diff
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
|
|
index 39fdcada6aa98058491aa6b5e5b9943c8a57a59d..e1a9a0ec6036133aa8fb195d22611df221bf5661 100644
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
@@ -156,6 +156,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 65daa359f000cf1acc3067af62e3210ced378519..357f59f07387d3de75a0792e7e883cb82aafa2e2 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -114,6 +114,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
|