mirror of
https://github.com/Phoenix616/RandomTeleport.git
synced 2024-11-13 06:07:38 +01:00
Use correct index
This commit is contained in:
parent
bdf794f7cb
commit
a49cc5fc8f
@ -168,12 +168,12 @@ public class RandomTeleport extends JavaPlugin implements RandomTeleportAPI {
|
|||||||
}));
|
}));
|
||||||
addOptionParser(new SimpleOptionParser(array("f", "force"), (searcher, args) -> {
|
addOptionParser(new SimpleOptionParser(array("f", "force"), (searcher, args) -> {
|
||||||
if (args.length > 0) {
|
if (args.length > 0) {
|
||||||
if ("regions".equalsIgnoreCase(args[1])) {
|
if ("regions".equalsIgnoreCase(args[0])) {
|
||||||
searcher.getValidators().remove("protection");
|
searcher.getValidators().remove("protection");
|
||||||
} else if ("blocks".equalsIgnoreCase(args[1])) {
|
} else if ("blocks".equalsIgnoreCase(args[0])) {
|
||||||
searcher.getValidators().add(new BlockValidator(false, unsaveBlocks));
|
searcher.getValidators().add(new BlockValidator(false, unsaveBlocks));
|
||||||
} else {
|
} else {
|
||||||
throw new NotFoundException(args[1]);
|
throw new NotFoundException(args[0]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
searcher.getValidators().remove("protection");
|
searcher.getValidators().remove("protection");
|
||||||
|
Loading…
Reference in New Issue
Block a user