Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Development' started by Exus-Kun, May 21, 2015.
Solved, Code = Confidential.
Does the ./link command work at all?
This is your problem. You do this:
String value = args;
but then you check if the length of the array is zero. You need to be checking if args.length is 1, not 0. You should also be checking for the array length before assigning a value from it, because you may end up with an ArrayIndexOutOfBoundsException.
Thanks for the help, I'll try it out in a few hours as I'm not near my computer atm
No, it doesn't but I'm sure audrey has made it a bit more clearer of what I have done wrong
if(cmd.getName().equalsIgnoreCase("link")&& args.length > 0)
//check your configuration.
//Inform player of incorrect arguments.