2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2022-08-01 16:01:20 +02:00
|
|
|
From: Nassim Jahnke <nassim@njahnke.dev>
|
2021-06-11 14:02:28 +02:00
|
|
|
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
|
2024-05-11 23:48:37 +02:00
|
|
|
index dc9742e553632cdc760ba1b392f60643a025a922..12446063a6c0f6c6f15a6a6500e76a99f5214001 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
2024-05-11 23:48:37 +02:00
|
|
|
@@ -545,6 +545,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
2024-04-27 01:43:59 +02:00
|
|
|
public String getMainLevelName() {
|
|
|
|
return ((net.minecraft.server.dedicated.DedicatedServer) net.minecraft.server.MinecraftServer.getServer()).getProperties().levelName;
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public int getProtocolVersion() {
|
|
|
|
+ return net.minecraft.SharedConstants.getCurrentVersion().getProtocolVersion();
|
|
|
|
+ }
|
|
|
|
// Paper end
|
|
|
|
|
2024-05-11 23:48:37 +02:00
|
|
|
@Override
|