Fix Array out of bounds exception on /bending give

This commit is contained in:
MistPhizzle 2014-09-07 21:18:22 -04:00
parent 7ededcf364
commit 1cb999dfcf

View file

@ -244,6 +244,11 @@ public class Commands {
* They are spawning in a grappling hook.
* bending give [Player] grapplinghook [# of Uses]
*/
if (args.length != 3) {
s.sendMessage(ChatColor.GOLD + "Proper Usage: /bending give GrapplingHook <#OfUses>");
return true;
}
int uses;
try {
uses = Integer.parseInt(args[3]);