Paper/Spigot-Server-Patches/0497-Expose-game-version.patch

28 lines
861 B
Diff

From fb892b50f8ea61b6b898cc2d86769fe3bbfa2fb8 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
index f49193d9d7..1647c09756 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -489,6 +489,13 @@ public final class CraftServer implements Server {
return bukkitVersion;
}
+ // Paper start - expose game version
+ @Override
+ public String getMinecraftVersion() {
+ return console.getVersion();
+ }
+ // Paper end
+
@Override
public List<CraftPlayer> getOnlinePlayers() {
return this.playerView;
--
2.26.2