Plugin.YML help! PLEASE!

Discussion in 'Bukkit Help' started by Qaisar101, Aug 17, 2014.

?

Having the same problem?

  1. Yes.

    50.0%
  2. No.

    50.0%
Thread Status:
Not open for further replies.
  1. Offline

    Qaisar101

    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!
     
  2. Offline

    moe097

    @Qauisar101

    This is the wrong section for this, but, Do you get a stacktrace when you run the commands?
     
  3. Offline

    Qaisar101

  4. Offline

    MarinD99

    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.
     
  5. Offline

    Qaisar101

    @Marin099
    How do you pass an instance to the other class. Also, it is 'main' and 'firework' class. :)
     
  6. Offline

    JordyPwner

  7. Offline

    Qaisar101

    Look, I'm only on episode 2 of Bukkit programming. How in the world do you register an event? XD!
     
  8. Offline

    PolarCraft

  9. Offline

    JordyPwner

    Qaisar101


    Code:java
    1. import org.bukkit.plugin.java.JavaPlugin;
    2.  
    3. public final class LoginPlugin extends JavaPlugin {
    4. public void onEnable() {
    5. getServer().getPluginManager().registerEvents(new LoginListener(), this);
    6. }
    7. }
    8.  
     
  10. Offline

    Qaisar101

    JordyPwner
    Where should I put this in the code? Plus, can you modify it so the classes match? 'main.class' and 'firework.class'.
     
  11. Offline

    Necrodoom

    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.
     
    Last edited by a moderator: Jun 9, 2016
  12. Offline

    JordyPwner

    Necrodoom Sorry iknow :p but otherwise he will spam it xd
     
  13. Offline

    Necrodoom

    JordyPwner doesn't matter. If someone wants to be spoonfed, its not beneficial for either parties to follow. It only pushes back the inevitable.
     
Thread Status:
Not open for further replies.

Share This Page