diff --git a/src/main/java/nl/SBDeveloper/V10Lift/API/Runnables/MoveLift.java b/src/main/java/nl/SBDeveloper/V10Lift/API/Runnables/MoveLift.java index f92790e..4af88e9 100644 --- a/src/main/java/nl/SBDeveloper/V10Lift/API/Runnables/MoveLift.java +++ b/src/main/java/nl/SBDeveloper/V10Lift/API/Runnables/MoveLift.java @@ -184,9 +184,9 @@ public class MoveLift implements Runnable { lib.setY(lib.getY() + 1); block = Objects.requireNonNull(Bukkit.getWorld(lib.getWorld()), "World is null at MoveLift").getBlockAt(lib.getX(), lib.getY(), lib.getZ()); BlockState state = block.getState(); - state.setType(lb.getMat()); + state.setType(lib.getMat()); if (!XMaterial.isNewVersion()) { - state.setRawData(lb.getData()); + state.setRawData(lib.getData()); } state.update(true); lb = lift.getBlocks().first(); @@ -224,9 +224,9 @@ public class MoveLift implements Runnable { for (LiftBlock lib : tb) { block = Objects.requireNonNull(Bukkit.getWorld(lib.getWorld()), "World is null at MoveLift").getBlockAt(lib.getX(), lib.getY(), lib.getZ()); BlockState state = block.getState(); - state.setType(lb.getMat()); + state.setType(lib.getMat()); if (!XMaterial.isNewVersion()) { - state.setRawData(lb.getData()); + state.setRawData(lib.getData()); } state.update(true); lift.getBlocks().add(lib); @@ -309,9 +309,9 @@ public class MoveLift implements Runnable { y = lib.getY(); block = world.getBlockAt(lib.getX(), lib.getY(), lib.getZ()); BlockState state = block.getState(); - state.setType(lb.getMat()); + state.setType(lib.getMat()); if (!XMaterial.isNewVersion()) { - state.setRawData(lb.getData()); + state.setRawData(lib.getData()); } state.update(true); } @@ -329,9 +329,9 @@ public class MoveLift implements Runnable { for (LiftBlock lib : tb) { block = Objects.requireNonNull(Bukkit.getWorld(lib.getWorld()), "World is null at MoveLift").getBlockAt(lib.getX(), lib.getY(), lib.getZ()); BlockState state = block.getState(); - state.setType(lb.getMat()); + state.setType(lib.getMat()); if (!XMaterial.isNewVersion()) { - state.setRawData(lb.getData()); + state.setRawData(lib.getData()); } state.update(true); lift.getBlocks().add(lib); diff --git a/src/main/java/nl/SBDeveloper/V10Lift/Listeners/PlayerInteractListener.java b/src/main/java/nl/SBDeveloper/V10Lift/Listeners/PlayerInteractListener.java index 28f3700..e2c5331 100644 --- a/src/main/java/nl/SBDeveloper/V10Lift/Listeners/PlayerInteractListener.java +++ b/src/main/java/nl/SBDeveloper/V10Lift/Listeners/PlayerInteractListener.java @@ -38,7 +38,7 @@ public class PlayerInteractListener implements Listener { if (action == Action.RIGHT_CLICK_BLOCK && e.getHand() != EquipmentSlot.OFF_HAND - && (button.toString().contains("_BUTTON") || button == XMaterial.LEVER.parseMaterial())) { + && (button.toString().contains("BUTTON") || button == XMaterial.LEVER.parseMaterial())) { String world = block.getWorld().getName(); int x = block.getX(); int y = block.getY();