Plugin not working

Discussion in 'Plugin Development' started by n31ln3t, Jan 7, 2013.

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

    n31ln3t

    Ok, so I'm learning bukkit plugin development, from TheBCBroz's youtube channel, and I've done everything what he has done but yet when I use start.bat the server doesn't say anything about the plguin, and when I go in-game and type /pl my plugin doesn't get shown in there.

    Here is the plugin code: http://pastie.org/5639026
    Plugin.yml code: http://pastie.org/5639035

    Thanks to all those who help
    Neil :)
     
  2. Offline

    eitorlaba

    Put @EventHandler upon onCommand
    Put @Override upon onDisable
    Put @Override upon onEnable
     
  3. Offline

    ZeusAllMighty11

    Your code looks fine. Any errors? (probably not since you said there are no messages)


    Make sure you exported all contents of the project


    You don't put @EventHandler over a command :\


    You don't need @Override on either of those methods.



    None of those things will help his code, just in the long run make it worse.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 8, 2016
  4. Offline

    eitorlaba

    Really ? o_o
    Then what's @Override for ?
     
  5. Offline

    RainoBoy97

    @EventHandler is for events, self explanatory
     
  6. Offline

    Sagacious_Zed Bukkit Docs

    @Override is to have the compiler check that the annotated method is indeed overriding a method of a super class, and in Java 6 an interface method. Generally it is a good idea to have it there, so you know you did something wrong.

    EDIT: did you actually deploy your plugin?
     
    n31ln3t likes this.
  7. Offline

    n31ln3t

    I added the @EventHandler on the onCommand method. And added the overrides on OnEnable, and OnDisable methods.

    I also did the exportation, is this correct http://i.imgur.com/7P4Hv.png for the exports?
     
  8. Offline

    n31ln3t

    Anyone? Please?
     
  9. try this for your plugin.yml

    Code:
    name: Youtube
    main: me.Bench3.youtube.Youtube
    version: 1.0
    commands:
      sendme:
        description: Sent!
        usage: /sendme
     
  10. Offline

    n31ln3t

    Nope, still no word from console, I used find word, to see if there was a word youtube up and down, and I checked it word for word. I really, don't know what to do.
     
  11. Offline

    n31ln3t

    Guys, I need help
     
  12. n31ln3t
    You don't use an event handler for onCommand. You using event handlers for events and your class has to implement listener.

    http://forums.bukkit.org/threads/new-event-system.55249/

    eitorlaba
    @Override is not really necessary as it will process your on enable anyway. Its optional so you can just remove that function from your class if you aren't doing anything with it.
     
  13. Offline

    raGan.

    Make sure you actually put your jar in plugins folder. Make sure there are no tabs in plugin.yml. You don't need .settings folder, .classpath and .project.
     
Thread Status:
Not open for further replies.

Share This Page