testserver/patches/server/0407-Expose-game-version.patch

25 lines
920 B
Diff
Raw Normal View History

2021-06-11 12:02:28 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Fri, 1 May 2020 17:39:26 +0300
Subject: [PATCH] Expose game version
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
2022-03-30 20:28:38 +00:00
index 8f5bd500a21715bc2da7c38f7f8123a2c0de0e96..d04a63299d57ee7d3d4cd53db752562924a90df4 100644
2021-06-11 12:02:28 +00:00
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
2022-03-01 05:43:03 +00:00
@@ -572,6 +572,13 @@ public final class CraftServer implements Server {
return this.bukkitVersion;
2021-06-11 12:02:28 +00:00
}
+ // Paper start - expose game version
+ @Override
+ public String getMinecraftVersion() {
+ return console.getServerVersion();
+ }
+ // Paper end
+
@Override
public List<CraftPlayer> getOnlinePlayers() {
return this.playerView;