Solved This isnt working?

Discussion in 'Spigot Plugin Development' started by iMedia, Jul 30, 2018.

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

    Supporter

    Hello,

    I would like someone to check my code because this is not setting the MOTD

    Code (Text):
    No code 4 u ;)

    I have no errors in console and no errors in the class
     
    #1 iMedia, Jul 30, 2018
    Last edited: Jul 30, 2018
  2. You need to register your listener. Besides that, it looks good and should work.

    AND

    The class you’re doing this doesnt implement Listener. Add that, and the @EventHandler attribute above the event methods.
     
  3. iMedia

    Supporter

    upload_2018-7-30_23-40-52.png

    implemented listener and what do you mean by the @EventHandler
     
  4. I believe onEnable needs to have the @Override annotation above it
    As for other event handlers none more need to be annotated
    Make sure you’ve registered the listener too
     
  5. iMedia

    Supporter

    Done all that still doesnt work
     
  6. Show full new class
     
  7. iMedia

    Supporter

    Code (Text):
    removed code
     
    #8 iMedia, Jul 30, 2018
    Last edited: Jul 31, 2018
  8. It isn't required.

    Have you null-checked and have you debugged? We are only human we can't fix things without seeing what does/doesn't work.

    P.s. you still haven't registered your event...
     
    • Like Like x 1
  9. iMedia

    Supporter

    How have I not registered my event
     
  10. iMedia

    Supporter

    removed pic
     

    Attached Files:

    #11 iMedia, Jul 30, 2018
    Last edited: Jul 31, 2018
Thread Status:
Not open for further replies.