Hello guys, I use this mehod to create command but it's doesn't work. How fix it? package BukkitTest.Cl; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.event.Listener; import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; public class Classe1 extends JavaPlugin implements Listener { public void onEnable() { PluginManager pm = getServer().getPluginManager(); pm.registerEvents(this, this); } public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { if(cmd.getName().equalsIgnoreCase("test")) { sender.sendMessage("Command work"); } return false; } }
I don't have error in console but I have : Unknow command Type "Help" for Help The command work correctly with the PlayerCommandPreprocessEvent but I need a method to can use the command in the console
don't Work @DaanSander Thank you @Skionz , I forgot to save the command in plugin.yml. <Edit by mrCookieSlime: Merged posts. Please don't double post. There is an Edit Button right next to the Date.>