Fixed slab support
This commit is contained in:
parent
78158f9f38
commit
f6bf85c654
3 changed files with 13 additions and 3 deletions
|
@ -45,6 +45,7 @@ public class LiftBlock implements Comparable<LiftBlock> {
|
|||
this.signLines = null;
|
||||
this.floor = floor;
|
||||
this.bisected = null;
|
||||
this.slabtype = null;
|
||||
}
|
||||
|
||||
/** 1.12 liftblocks **/
|
||||
|
@ -61,6 +62,7 @@ public class LiftBlock implements Comparable<LiftBlock> {
|
|||
this.signLines = null;
|
||||
this.floor = null;
|
||||
this.bisected = null;
|
||||
this.slabtype = null;
|
||||
}
|
||||
|
||||
/* 1.12 liftblock (sign) */
|
||||
|
@ -75,6 +77,7 @@ public class LiftBlock implements Comparable<LiftBlock> {
|
|||
this.signLines = signLines;
|
||||
this.floor = null;
|
||||
this.bisected = null;
|
||||
this.slabtype = null;
|
||||
}
|
||||
|
||||
/** 1.13 liftblocks **/
|
||||
|
@ -91,6 +94,7 @@ public class LiftBlock implements Comparable<LiftBlock> {
|
|||
this.signLines = null;
|
||||
this.floor = null;
|
||||
this.bisected = null;
|
||||
this.slabtype = null;
|
||||
}
|
||||
|
||||
/* 1.13 liftblock (Directional) */
|
||||
|
@ -105,6 +109,7 @@ public class LiftBlock implements Comparable<LiftBlock> {
|
|||
this.signLines = null;
|
||||
this.floor = null;
|
||||
this.bisected = null;
|
||||
this.slabtype = null;
|
||||
}
|
||||
|
||||
/* 1.13 liftblock (dir & bisec) */
|
||||
|
@ -119,6 +124,7 @@ public class LiftBlock implements Comparable<LiftBlock> {
|
|||
this.signLines = null;
|
||||
this.floor = null;
|
||||
this.bisected = bisected;
|
||||
this.slabtype = null;
|
||||
}
|
||||
|
||||
/* 1.13 liftblock (sign) */
|
||||
|
@ -133,6 +139,7 @@ public class LiftBlock implements Comparable<LiftBlock> {
|
|||
this.signLines = signLines;
|
||||
this.floor = null;
|
||||
this.bisected = null;
|
||||
this.slabtype = null;
|
||||
}
|
||||
|
||||
/* 1.13 liftblock (slab) */
|
||||
|
@ -146,6 +153,7 @@ public class LiftBlock implements Comparable<LiftBlock> {
|
|||
this.data = 0;
|
||||
this.signLines = null;
|
||||
this.floor = null;
|
||||
this.bisected = null;
|
||||
this.slabtype = slabtype;
|
||||
}
|
||||
|
||||
|
|
|
@ -209,7 +209,7 @@ public class V10LiftAPI {
|
|||
lb = new LiftBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), type, DirectionUtil.getDirection(block));
|
||||
} else if (block.getBlockData() instanceof org.bukkit.block.data.type.Slab) {
|
||||
Bukkit.getLogger().info("Block instanceof Slab 1.13");
|
||||
lb = new LiftBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), type, DirectionUtil.getDirection(block), DirectionUtil.getSlabType(block));
|
||||
lb = new LiftBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), type, DirectionUtil.getSlabType(block));
|
||||
} else {
|
||||
Bukkit.getLogger().info("Block not instanceof Dir 1.13");
|
||||
lb = new LiftBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), type);
|
||||
|
@ -266,7 +266,7 @@ public class V10LiftAPI {
|
|||
lb = new LiftBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), type, DirectionUtil.getDirection(block));
|
||||
} else if (block.getBlockData() instanceof org.bukkit.block.data.type.Slab) {
|
||||
Bukkit.getLogger().info("Block instanceof Slab 1.13");
|
||||
lb = new LiftBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), type, DirectionUtil.getDirection(block), DirectionUtil.getSlabType(block));
|
||||
lb = new LiftBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), type, DirectionUtil.getSlabType(block));
|
||||
} else {
|
||||
Bukkit.getLogger().info("Block not instanceof Dir 1.13");
|
||||
lb = new LiftBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), type);
|
||||
|
@ -323,7 +323,7 @@ public class V10LiftAPI {
|
|||
lb = new LiftBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), type, DirectionUtil.getDirection(block));
|
||||
} else if (block.getBlockData() instanceof org.bukkit.block.data.type.Slab) {
|
||||
Bukkit.getLogger().info("Block instanceof Slab 1.13");
|
||||
lb = new LiftBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), type, DirectionUtil.getDirection(block), DirectionUtil.getSlabType(block));
|
||||
lb = new LiftBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), type, DirectionUtil.getSlabType(block));
|
||||
} else {
|
||||
Bukkit.getLogger().info("Block not instanceof Dir 1.13");
|
||||
lb = new LiftBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), type);
|
||||
|
|
|
@ -46,6 +46,7 @@ public class DirectionUtil {
|
|||
try {
|
||||
half = org.bukkit.block.data.Bisected.Half.valueOf(bisected);
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -74,6 +75,7 @@ public class DirectionUtil {
|
|||
try {
|
||||
type = org.bukkit.block.data.type.Slab.Type.valueOf(slabtype);
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue