Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
23 Zeilen
1.0 KiB
Diff
23 Zeilen
1.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Nassim Jahnke <nassim@njahnke.dev>
|
|
Date: Fri, 26 Mar 2021 11:23:17 +0100
|
|
Subject: [PATCH] Expose protocol version
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
index b075d4b21b53a3f39094444e4024556b23e399f2..f833fcead688180daf7039e09dce46fde924043c 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
@@ -521,6 +521,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
|
public String getMainLevelName() {
|
|
return ((net.minecraft.server.dedicated.DedicatedServer) net.minecraft.server.MinecraftServer.getServer()).getProperties().levelName;
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public int getProtocolVersion() {
|
|
+ return net.minecraft.SharedConstants.getCurrentVersion().getProtocolVersion();
|
|
+ }
|
|
// Paper end
|
|
|
|
@Override
|