From a554ae5633ec138233b83a8fb08b86cb0e8b4e2c Mon Sep 17 00:00:00 2001 From: MattBDev Date: Fri, 9 Dec 2016 16:58:32 -0500 Subject: [PATCH] Potential fix for commands --- .../com/intellectualcrafters/plot/commands/MainCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java b/Core/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java index fb46885c6..34cea9087 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java @@ -223,12 +223,12 @@ public class MainCommand extends Command { // Trim command args = Arrays.copyOfRange(args, 1, args.length); } - if (args.length >= 2 && args[0].charAt(0) == '-') { + if (args.length >= 2 && !args[0].isEmpty() && args[0].charAt(0) == '-') { switch (args[0].substring(1)) { case "f": confirm = new RunnableVal3() { @Override - public void run(final Command cmd, final Runnable success, final Runnable failure) { + public void run(Command cmd, Runnable success, Runnable failure) { if (EconHandler.manager != null) { PlotArea area = player.getApplicablePlotArea(); if (area != null) {