Fixed ArrayIndexOutOfBoundsException for start command
This commit is contained in:
parent
01012abbbb
commit
9ce170acb3
1 changed files with 1 additions and 1 deletions
|
@ -313,7 +313,7 @@ public class V10LiftCommand implements CommandExecutor {
|
||||||
Lift lift = DataManager.getLift(liftName);
|
Lift lift = DataManager.getLift(liftName);
|
||||||
|
|
||||||
String floorName = null;
|
String floorName = null;
|
||||||
if (args.length == 2) {
|
if (args.length == 1 || args.length == 2) {
|
||||||
for (LiftBlock lb : lift.getBlocks()) {
|
for (LiftBlock lb : lift.getBlocks()) {
|
||||||
Block block = Objects.requireNonNull(Bukkit.getWorld(lb.getWorld()), "World is null at start command").getBlockAt(lb.getX(), lb.getY(), lb.getZ());
|
Block block = Objects.requireNonNull(Bukkit.getWorld(lb.getWorld()), "World is null at start command").getBlockAt(lb.getX(), lb.getY(), lb.getZ());
|
||||||
if (block.getState() instanceof Sign) {
|
if (block.getState() instanceof Sign) {
|
||||||
|
|
Loading…
Reference in a new issue