From a49cc5fc8fc5ff0698bdb98d458fff8e606592c8 Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Sat, 27 Apr 2019 17:00:03 +0100 Subject: [PATCH] Use correct index --- .../main/java/de/themoep/randomteleport/RandomTeleport.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/randomteleport-plugin/src/main/java/de/themoep/randomteleport/RandomTeleport.java b/randomteleport-plugin/src/main/java/de/themoep/randomteleport/RandomTeleport.java index 6fd73ef..c5dd669 100644 --- a/randomteleport-plugin/src/main/java/de/themoep/randomteleport/RandomTeleport.java +++ b/randomteleport-plugin/src/main/java/de/themoep/randomteleport/RandomTeleport.java @@ -168,12 +168,12 @@ public class RandomTeleport extends JavaPlugin implements RandomTeleportAPI { })); addOptionParser(new SimpleOptionParser(array("f", "force"), (searcher, args) -> { if (args.length > 0) { - if ("regions".equalsIgnoreCase(args[1])) { + if ("regions".equalsIgnoreCase(args[0])) { searcher.getValidators().remove("protection"); - } else if ("blocks".equalsIgnoreCase(args[1])) { + } else if ("blocks".equalsIgnoreCase(args[0])) { searcher.getValidators().add(new BlockValidator(false, unsaveBlocks)); } else { - throw new NotFoundException(args[1]); + throw new NotFoundException(args[0]); } } else { searcher.getValidators().remove("protection");