From efad176d174c5309fef33a79436d6d3d87e96c3f Mon Sep 17 00:00:00 2001 From: Zrips Date: Sun, 26 May 2019 11:22:20 +0300 Subject: [PATCH] We have to convert slab type into String --- .../java/com/gamingmesh/jobs/CMILib/ItemManager.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/CMILib/ItemManager.java b/src/main/java/com/gamingmesh/jobs/CMILib/ItemManager.java index 90015074..3273c8f5 100644 --- a/src/main/java/com/gamingmesh/jobs/CMILib/ItemManager.java +++ b/src/main/java/com/gamingmesh/jobs/CMILib/ItemManager.java @@ -3447,12 +3447,15 @@ public class ItemManager { if (Version.isCurrentEqualOrHigher(Version.v1_13_R1)) { if (block.getBlockData() instanceof org.bukkit.block.data.type.Slab) { org.bukkit.block.data.type.Slab slab = (org.bukkit.block.data.type.Slab) block.getBlockData(); - switch (slab.getType()) { - case TOP: + org.bukkit.block.data.type.Slab.Type type = slab.getType(); + + // Sadly we have to convert into a string for backwards compatibility. + switch (type.toString()) { + case "TOP": return SlabType.TOP; - case BOTTOM: + case "BOTTOM": return SlabType.BOTTOM; - case DOUBLE: + case "DOUBLE": return SlabType.DOUBLE; }