mirror of
https://github.com/Zrips/Jobs.git
synced 2025-02-18 05:11:32 +01:00
We have to convert slab type into String
This commit is contained in:
parent
7cbdf51713
commit
efad176d17
@ -3447,12 +3447,15 @@ public class ItemManager {
|
|||||||
if (Version.isCurrentEqualOrHigher(Version.v1_13_R1)) {
|
if (Version.isCurrentEqualOrHigher(Version.v1_13_R1)) {
|
||||||
if (block.getBlockData() instanceof org.bukkit.block.data.type.Slab) {
|
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();
|
org.bukkit.block.data.type.Slab slab = (org.bukkit.block.data.type.Slab) block.getBlockData();
|
||||||
switch (slab.getType()) {
|
org.bukkit.block.data.type.Slab.Type type = slab.getType();
|
||||||
case TOP:
|
|
||||||
|
// Sadly we have to convert into a string for backwards compatibility.
|
||||||
|
switch (type.toString()) {
|
||||||
|
case "TOP":
|
||||||
return SlabType.TOP;
|
return SlabType.TOP;
|
||||||
case BOTTOM:
|
case "BOTTOM":
|
||||||
return SlabType.BOTTOM;
|
return SlabType.BOTTOM;
|
||||||
case DOUBLE:
|
case "DOUBLE":
|
||||||
return SlabType.DOUBLE;
|
return SlabType.DOUBLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user