Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
1143b63663
* Add Position * move Position patch to start
51 Zeilen
1.8 KiB
Diff
51 Zeilen
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 51a43429e58fbebf8c95d23257cd9c84ce57b1aa..f4897529322f57eaf0d26ce82307dcd785511af8 100644
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
@@ -155,6 +155,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 122ef60bcb1548713f2e355cb77eccbebcd17f04..97c2708b69ff01f9e7898ad7282016cac605bc79 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -113,6 +113,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
|