mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 04:02:50 +01:00
ce0e78c103
compile fixes compile fixes
25 lines
1.3 KiB
Diff
25 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Wed, 4 May 2016 22:43:12 -0400
|
|
Subject: [PATCH] ensureServerConversions API
|
|
|
|
This will take a Bukkit ItemStack and run it through any conversions a server process would perform on it,
|
|
to ensure it meets latest minecraft expectations.
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
|
index cf9069d7b3607c190459ee47ab5f7ca4ff10d03b..313b682ad4826cbe68dd66bd30e79a4101540cad 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
|
@@ -513,4 +513,12 @@ public final class CraftItemFactory implements ItemFactory {
|
|
return io.papermc.paper.adventure.PaperAdventure.asAdventure(CraftItemStack.asNMSCopy(itemStack).getDisplayName());
|
|
}
|
|
// Paper end - Adventure
|
|
+
|
|
+ // Paper start - ensure server conversions API
|
|
+ // TODO: DO WE NEED THIS?
|
|
+ @Override
|
|
+ public ItemStack ensureServerConversions(ItemStack item) {
|
|
+ return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item));
|
|
+ }
|
|
+ // Paper end - ensure server conversions API
|
|
}
|