Hi im just making My first plugin and im messing up code can anyone help me?
http://pastebin.com/R0raGcL7 my coding is there
http://pastebin.com/R0raGcL7 my coding is there
1
Can you tell us what the problem is?
Anyways:
1) Check if the caster is a player first, or console won't be able to execute the command and it will through an error. Your plugin just sends a message so you don't need to even cast to player and you can use sender.sendMessage();
2) Don't check if commandLabel is the command, check if the command name is the command
3) No need to do the logging methods, bukkit automatically does it for you.
Anyways:
1) Check if the caster is a player first, or console won't be able to execute the command and it will through an error. Your plugin just sends a message so you don't need to even cast to player and you can use sender.sendMessage();
2) Don't check if commandLabel is the command, check if the command name is the command
3) No need to do the logging methods, bukkit automatically does it for you.
