#Args

1 messages · Page 1 of 1 (latest)

full slate
#

https://paste.md-5.net/feyigajage.java <-- Anyone know what's up with this? It's only returning usage at base command - Using a switch as i'll be adding more options and it's just cleaner than if else statements.

#

My command is /boosters give <player> <booster> <amount>

elfin patio
#

args.length starts at 1, args[] starts at 0

full slate
#

args.length is 4, args[3] is the amount

elfin patio
#

args.length = 0 doesnt exist

full slate
#

ahhh

#

my method

#

Still doesn't return any usage after base command and the command doesn't work

elfin patio
#

what is it meant to return, no idea what misc.usage does

full slate
#

It's just the usage, that's not the problem

#

I'm simply giving an item

#

That's just usage method

elfin patio
#

so whats not returning usage

#

if its returning it on args 2 & 3 but not 4, you need <=

full slate
#

It's not returning it at all. Apart from the initial base command "/boosters"

#

then it's not even giving an item

#

when all args are met

elfin patio
#

add sys outs and see where it gets to

full slate
elfin patio
#

add one at the start of both methods

#

if they dont run the class isnt getting called

full slate
#

Okay

#

Yeah the class isn't getting called

#

How strange i've used this CommandManager loads

#

Ahhh I know why

#

ffs