Fixed offline input not working

This commit is contained in:
stijnb1234 2020-02-25 21:24:28 +01:00
parent 74b4ce38fb
commit 3db2ab11f2
2 changed files with 2 additions and 2 deletions

View file

@ -161,7 +161,7 @@ public class V10LiftAPI {
DataManager.removeLift(liftName); DataManager.removeLift(liftName);
DataManager.addLift(newName, lift); DataManager.addLift(newName, lift);
for (LiftSign ls : lift.getSigns()) { for (LiftSign ls : lift.getSigns()) {
Block block = Objects.requireNonNull(Bukkit.getWorld(ls.getWorld()), "World is null at setDefective").getBlockAt(ls.getX(), ls.getY(), ls.getZ()); Block block = Objects.requireNonNull(Bukkit.getWorld(ls.getWorld()), "World is null at renameLift").getBlockAt(ls.getX(), ls.getY(), ls.getZ());
BlockState bs = block.getState(); BlockState bs = block.getState();
if (!(bs instanceof Sign)) continue; if (!(bs instanceof Sign)) continue;
Sign si = (Sign) bs; Sign si = (Sign) bs;

View file

@ -51,7 +51,7 @@ public class PlayerInteractListener implements Listener {
for (LiftBlock lb : lift.getOfflineInputs()) { for (LiftBlock lb : lift.getOfflineInputs()) {
if (world.equals(lb.getWorld()) && x == lb.getX() && y == lb.getY() && z == lb.getZ()) { if (world.equals(lb.getWorld()) && x == lb.getX() && y == lb.getY() && z == lb.getZ()) {
lb.setActive(!lb.isActive()); lb.setActive(!lb.isActive());
V10LiftPlugin.getAPI().setDefective(entry.getKey(), lb.isActive()); V10LiftPlugin.getAPI().setOffline(entry.getKey(), lb.isActive());
return; return;
} }
} }