I'm making a Bukkit plugin. It is called Vitals. I have two features so far, a firework on join and /hub, a command to teleport to spawn. /Hub has a class called 'main' and the firework has a class called 'firework'. In the plugin.yml, I put 'main: me.BukkitQaisar.Vitals.main' but the firework doesn't work. When I put 'main: me.BukkitQaisar.Vitals.firework', /hub doesn't work! Please help! Here is what is in my plugin.yml file. Code: name: Vitals author: BukkitQaisar version: 1.02 description: Adds a lot of VITAL commands. /HUB, Firework on join! prefix: Vitals main: me.BukkitQaisar.Vitals. commands: hub: description: Teleports player to hub/spawn!
@Qauisar101 This is the wrong section for this, but, Do you get a stacktrace when you run the commands?
Please move this thread to Plugin Devlopment. And by the way, here's the solution to your problem; in order for your plugin to work, you need to register your package WITH the Main class, in this case, the Hub class. This is how it should look like in the plugin.yml: main: main: me.BukkitQaisar.Vitals.Hub Also make sure that you've passed an instance of your Main class to the Fireworks class.
Qaisar101 Code:java import org.bukkit.plugin.java.JavaPlugin; public final class LoginPlugin extends JavaPlugin { public void onEnable() { getServer().getPluginManager().registerEvents(new LoginListener(), this); }}
JordyPwner Where should I put this in the code? Plus, can you modify it so the classes match? 'main.class' and 'firework.class'.
Qaisar101 Modify it yourself, change the names. If you dont know how, youd need to learn java first, not bukkit. JordyPwner That was unneeded. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
JordyPwner doesn't matter. If someone wants to be spoonfed, its not beneficial for either parties to follow. It only pushes back the inevitable.