#args gives null error

1 messages · Page 1 of 1 (latest)

rustic spindle
#

so i'm trying to make a warp command (to learn java) but everytime i don't put the right amount of args in the command it gives me a error in console saying: [20:32:18] [Server thread/ERROR]: null org.bukkit.command.CommandException: Unhandled exception executing command 'warp' in plugin is this because i didnt put the right amount of args in? even tho i did if (args[1] != null)? here is the code ```switch (args[0]) {
case "create":
if (args[1] != null) {
p.sendMessage("test create");
} else {
p.sendMessage("test null");
}
break;
case "delete":
if (args[1] != null) {
p.sendMessage("test delete");
} else {
p.sendMessage("test null");
}
break;
default:
p.sendMessage("test");
}

crude schooner
#

Send image of error