I have started making a plugin, and when I made a config option for the command /staff, I got a huge error in console, I tried reading it, but I just don't know whats wrong with it. http://pastebin.com/S5i9YH3c Thats the stack trace. I also tried making a heal command but it didn't work. Here is the code for my main class if you can help me: http://pastebin.com/ncUvbNJn
this isnt a problem with code, the yml file is incorrectly written. paste it, and ill tell you where its gone wrong edit: in regards to your healing code, you dont need to check their permissions. set the permission node for the registered command, give the user the permission, and it will automatically deny them from using the command if they dont have the permission. also, make sure youve registered the command. edit2: im not 100% sure, but wont setMaximumAir() set the maximum air they have, not the current level?
I wouldnt make 2 separate onCommands, i would do Code: public void onCommand(CommandSender sender, Command cmd, String label, String[] args){ if(cmd.getName().equalsIgnoreCase("staff"){ //code here } if(cmd.getName().equalsIgnoreCase("heal"){ //code here } return true; }