Why does this command not work? http://pastebin.com/yg3TANqC Any Ideas? Please help me. Plugin.yml: commands: ribal: permission: risingempire.economy
I have done it but still nothing... Now I get this error: http://pastebin.com/L6mb8mg2 But only if I run it from console...
Use: Code (Text): @Override public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) { //Your code goes here }
Your class must implement CommandExecutor, your method name is spelled incorrectly. You blind cast to player, your spacing is inconsistent. EDIT: Then make another class with an onCommand method... Don't cram everything into one.
You should rename the method 'onCommand2()' to 'onCommand()', because this method is overriding the method of the super class (JavaPlugin).
Add another if-statement that checks if the sender is an instanceof Player. If it's not then just stop the command.