When i do the command it says it dont exist. when i look in console there isnt even an error code! Main class(The only one) Code: package com.gmail.rasmase.BukkitTest; import java.util.logging.Logger; import org.bukkit.plugin.java.*; import org.bukkit.command.CommandSender; import org.bukkit.command.*; import org.bukkit.entity.*; public class BukkitTest extends JavaPlugin { Logger log = this.getLogger(); public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){ if(cmd.getName().equalsIgnoreCase("burnme")) { // If the player typed /killme then do the following... if ((sender instanceof Player)) { Player s = (Player)sender; s.setFireTicks(10000); } else { log.info("*Login please"); } return true; } else if (cmd.getName().equalsIgnoreCase("killme")) { if ((sender instanceof Player)) { Player s = (Player)sender; s.setHealth(0); } else { log.info("Login please"); } return true; } return false; } } (Plugin.yml) Code: name: BukkitTest main: com.gmail.rasmase.BukkitTest version: 1.00 commands: killme: description: This kills the player. usage: /killme burnme: description: This kills the player. usage: /burnme
Well you do know that you have to have onEnable() and onDisable() in your plugin class right? Also, you should use the @Override tag with all the inherited JavaPlugin classes. Look at that link to see what the inherited class from bukkit looks like. Also try doing "usage: /<command>" instead of "usage: /killme". Bukkit automagically replaces <command> with the command the user typed in to get there.
Actually, onEnable and onDisable should no longer mandatory, as they are now concrete instead of abstract. You can try overriding with nothing in the body but i dont think that will do anything.
that would be the problem.. use Code:java public static Logger log = Logger.getLogger("Minecraft"); Also.. I would recommend using this check for the sender... Code:java if (!(sender instanceof Player)) {sender.sendMessage(ChatColor.RED+"You must login to do this!");return true;} it's just a little bit cleaner .
Rasmase: you only define the package as main, the class name must be there too. Code: main: com.gmail.rasmase.BukkitTest.BukkitTest