Made buttons work as offline input levers, closes #64
This commit is contained in:
parent
c03a7ee5b7
commit
d6ca0d4bec
1 changed files with 1 additions and 4 deletions
|
@ -63,10 +63,7 @@ public class PlayerInteractListener implements Listener {
|
||||||
for (LiftInput li : lift.getOfflineInputs()) {
|
for (LiftInput li : lift.getOfflineInputs()) {
|
||||||
Block b = Bukkit.getWorld(li.getWorld()).getBlockAt(li.getX(), li.getY(), li.getZ());
|
Block b = Bukkit.getWorld(li.getWorld()).getBlockAt(li.getX(), li.getY(), li.getZ());
|
||||||
BlockData bd = b.getBlockData();
|
BlockData bd = b.getBlockData();
|
||||||
if (!(bd instanceof Powerable)) {
|
if (!(bd instanceof Powerable)) continue;
|
||||||
Bukkit.getLogger().warning("[V10Lift] Block at " + li.getX() + ", " + li.getY() + ", " + li.getZ() + " is not powerable, while it should be an offline input of " + entry.getKey() + "!");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
((Powerable) bd).setPowered(newState);
|
((Powerable) bd).setPowered(newState);
|
||||||
b.setBlockData(bd);
|
b.setBlockData(bd);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue