mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-17 08:05:31 +01:00
96d5e6ca48
Currently includes generated key holder classes for types used in the Registry Modification API
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 cadc844025ac3f58f57932f551a21b90b5698504..eae067f9df19a25e3103657c4354864ba6452923 100644
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
@@ -158,6 +158,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 655dbcc38e35d3b3fa11cbf863a6ba63cc56b47d..f14733e114c104d70d2a1c1b8e708fde06b0cdb0 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -116,6 +116,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
|