mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 04:09:54 +01:00
23 lines
1.0 KiB
Diff
23 lines
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 125ed63d8ae812284cd452b4387fd0d674c9c25a..c4457bb46c3e66f5954383fb18b6109a5fe2772d 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
@@ -556,6 +556,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
|
public io.papermc.paper.inventory.ItemRarity getItemStackRarity(org.bukkit.inventory.ItemStack itemStack) {
|
|
return io.papermc.paper.inventory.ItemRarity.values()[itemStack.getRarity().ordinal()];
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public int getProtocolVersion() {
|
|
+ return net.minecraft.SharedConstants.getCurrentVersion().getProtocolVersion();
|
|
+ }
|
|
// Paper end
|
|
|
|
/**
|