Paper/patches/server/0413-Expose-game-version.patch
Nassim Jahnke 92c777d393
Fix PlayerProfile BukkitObject serialization, deprecate setName and setId for removal (#7471)
Having a modifiable hash here is a bit flawed and most developers should never need these methods
2022-02-12 19:29:41 +01:00

25 Zeilen
920 B
Diff

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