Skip to content

Commit

Permalink
Arg length fix
Browse files Browse the repository at this point in the history
  • Loading branch information
espidev committed Apr 21, 2019
1 parent d3dce0e commit 8526a69
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ public static boolean argumentGet(Player p, String[] args) {
return true;
}

if (args.length != 2) {
p.sendMessage(PSL.GET_HELP.msg());
return true;
}

// check if argument is valid block
ConfigProtectBlock cp = ProtectionStones.getProtectBlockFromName(args[1]);
if (cp == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ public static boolean argumentGive(Player p, String[] args) {
return true;
}

if (args.length != 3) {
p.sendMessage(PSL.GIVE_HELP.msg());
return true;
}

// check if argument is valid block
ConfigProtectBlock cp = ProtectionStones.getProtectBlockFromName(args[1]);
if (cp == null) {
Expand Down

0 comments on commit 8526a69

Please sign in to comment.