Could not load 'plugins/My.jar' in folder 'plugins' Code: package staff.plugin; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; public class Main extends JavaPlugin{ public void onEnable () { System.out.println("Plugin Abilitato"); } public void onDisable() { System.out.println("Plugin Disabilitato"); } public boolean onCommand(CommandSender sender, Command cmd, String[] args) { if(cmd.getName().equalsIgnoreCase("Prova")) { Player player = (Player) sender; player.sendMessage("Sei pronto per essere un staffer"); player.getExp(); } return false; } } plugin.yml Code: name:provaplugin main: staff.plugin:Main version: 1.0 description:Ilmioprimoplugin
Should look like this: Code: name: ProvaPlugin main: staff.plugin.main version: 1.1 author: _ionut_ (optional) description: Ilmio PorvaPlugin (optional) wesbite: bukkit.org (optional) commands: prova: usage: /prova description: ProvaPlugin Command (optional) also in your onEnable() , make sure to register your command so add this line : Code: getServer().getPluginCommand("prova").setExecutor(this); "prova" is the command and "this" is the class that implements CommandExecutor so in this case this class. In this case you have not done this, so make sure the first line looks like this: Code: public class Main extends JavaPlugin implements CommandExecutor { When you implement CommandExecutor you are saying that this class (in this case Main) contains a new command with the onCommand method You should look around on youtube to find helpful videos!