mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 04:02:50 +01:00
23 lines
1,005 B
Diff
23 lines
1,005 B
Diff
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: KennyTV <jahnke.nassim@gmail.com>
|
||
|
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 712a32c0b64dace1f3e3d6f8acb8cbef1736b1f9..6bfba82b428250e6725688d196b3dc6ac11a5e01 100644
|
||
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||
|
@@ -461,6 +461,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||
|
return io.papermc.paper.inventory.ItemRarity.values()[getItem(itemStack.getType()).getItemStackRarity(CraftItemStack.asNMSCopy(itemStack)).ordinal()];
|
||
|
}
|
||
|
|
||
|
+ @Override
|
||
|
+ public int getProtocolVersion() {
|
||
|
+ return net.minecraft.SharedConstants.getGameVersion().getProtocolVersion();
|
||
|
+ }
|
||
|
+
|
||
|
// Paper end
|
||
|
|
||
|
/**
|