Solved HELP ME! I events don't work to me!!!

Discussion in 'Spigot Plugin Development' started by SirCodalot, May 17, 2016.

Thread Status:
Not open for further replies.
  1. I created a really nice plugin that 80% of it is full of events. One day the commands worked but the events didnt. I quitted making the plugin and move to another one, events didnt work for me too. After three broken plugins I finally realised I have problem with events. I tried to make the easiest message on join event as a test and it didnt work too, so yeah now I am fully sure it is not because I am a "noob" in coding plugins. If it happened to you please help me because all of my plugins have events and I cannot touch them now. I don't know if it will help you but I am using the program "Eclipse" to code the plugins.
  2. Did you register the event?

    Did you put @EventHandler over it?
  3. Yes
  4. Show the code of your simple join plugin...

    when you do /plugins does it show?
  5. Show us your code!
    • Agree Agree x 1
  6. Okay, here you go:
    By the way I can see it on /plugins and the commands and config are great... the events are my only problem. This is not the only plugin that I made that it's events just started to not work.
  7. but I already removed the join code I made to see if events are broken.
    I will try to crecreate it:

    public void onPlayerJoin(PlayerJoinEvent event){
    Player player = event.getPlayer();

    I think thats how I made it
  8. Add:
    Bukkit.getPluginManager().registerEvents(this, this);
    to the begining of you onEnable() and make @EventHandler to @EventHandler(priority = EventPriority.HIGHEST)
    • Agree Agree x 1
  9. Already tried, it is like the event lines does not exitst even if they are written.
  10. Okay Sorry, I can't help you.
    • Funny Funny x 1
  11. Okay thanks anyways
  12. You have a broken spigot version then
  13. The same problem happened me in all of my plugins, and some of them have different jars (some are 1.8 and some are 1.7).
  14. I have never seen this problem before, could you please share the whole class file of one of your (not working) plugins?
  15. I sent the main file but it is already useless since the bug is not in the code lines.
  16. Show us a sample project where you have actually registered your events.
  17. Please check the logs file for any start up errors
    Remember to register your events
    Post any errors you find
    Make sure you include the @EventHandler annotation.
  18. Please provide the Stacktrace from the console? And are you sure you're compiling with the same Java version the server is running? If not, please update it to the correct version, then it should work.
  19. I already checked everything. I am 99% sure the problem is in eclipse so tell me if you have any ideas. I already said that but it broke all of my plugins, even ones that I finished and they worked for over a month. (means I coded it right)
  20. Eclipse is not going to make the plugins on your server stop working. Did you update Spigot right before this happened? Check your console/logs for exceptions and also run the "plugins" command and make sure your plugins are listed and enabled(green).
Thread Status:
Not open for further replies.