From 5bb7069c7f7776922756f33865c82fae3cf3e67b Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Mon, 11 Nov 2019 20:39:28 +0000 Subject: [PATCH] Fixes #2571 --- .../plotsquared/bukkit/util/BukkitInventoryUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitInventoryUtil.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitInventoryUtil.java index a5a64b307..303b180e5 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitInventoryUtil.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/BukkitInventoryUtil.java @@ -5,6 +5,7 @@ import com.github.intellectualsites.plotsquared.plot.object.PlotInventory; import com.github.intellectualsites.plotsquared.plot.object.PlotItemStack; import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; import com.github.intellectualsites.plotsquared.plot.util.InventoryUtil; +import com.sk89q.worldedit.bukkit.BukkitAdapter; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -56,7 +57,7 @@ public class BukkitInventoryUtil extends InventoryUtil { if (item == null) { return null; } - ItemStack stack = new ItemStack(BukkitUtil.getMaterial(item.getBlockState()), item.amount); + ItemStack stack = new ItemStack(BukkitAdapter.adapt(item.getType()), item.amount); ItemMeta meta = null; if (item.name != null) { meta = stack.getItemMeta();