Hello, I am making a plugin for a KitPvP server, and I wanted to make a plugin so that when a player is killed, they will drop nothing BUT 3 gold. I have done a small code but it doesn't seem to work, any help? Thanks
JoelyBob implement Listener, register the Listener in onEnable. http://wiki.bukkit.org/Event_API_Reference
JoelyBob, 1.) Material.GOLD_NUGGET is a golden nugget not a GOLD_INGOT. 2.) Add this into your code: Code:java public void onEnable() { Bukkit.getServer().getPluginManager().registerEvents(this, this); }
Yeah, I mean't gold nuggets Also, thanks! xAstraah When I implemented that code, it came up with an error on the registerEvents. It says: "The method registerEvents(Listener, Plugin) in the type PluginManager is not applicable for the arguments (PvPEarns, PvPEarns)" What do I do? EDIT by Moderator: merged posts, please use the edit button instead of double posting.
JoelyBob Are you using multiple classes? If so https://forums.bukkit.org/threads/tutorial-using-multiple-classes.179833/