Migrating Plugin to Bungee Server causes it to break

Discussion in 'BungeeCord Plugin Development' started by Haun1400, Aug 6, 2013.

  1. Hi Guys,

    So I just found an issue on my new bungee cord server/proxy that I really haven't had a chance to look into yet. From what I can see, my OnPlayerLogin events and asyncplayerlogin events don't seem to work anymore after changing to bungee. (The more important one is asyc because it does some database stuff)

    Now, with a quick look around online it looks like the bungee cord API has commands for login events and some other types of events. My question is, do I just need to change the imported Event or do I actually need to change the structure of my code when I get home?

    Thanks!
    --Haun1400
     
    #1 Haun1400, Aug 6, 2013
    Last edited: Aug 6, 2013
  2. Erm... Bukkit API !== BungeeCord API, you know that right ? Bukkit events will not change before and after you put bungeecord on.
     
  3. Hi Roblabla,

    That is what I thought. This is mostly true, except for the fact that the ASyncPlayerPreLoginEvent does not trigger any more. That was the issue. I really liked this event as it runs things aside from the Main Thread.

    Problem solved though!
     
  4. Something weird is going on. Bukkit behaves the exact same way w/ and w/o bungeecord, as IT IS NOT AWARE OF IT. If an event handler isn't triggering, then your event handler is broken. Not the event itself.
     
    • Agree Agree x 1
  5. joehot200

    Supporter

    Bungee is just like a normal player connecting to the server. If it could actually make the server do strange things, i could point my bungee to a 5000+ people server and make it go weird. Not gonna happen :p
     
  6. Wait, so what your saying is the ASyncPrePlayer Login should work? If it doesn't the event handler might be broken. Is this something I should try a different build of Bungee for? I'm exactly sure what would fix the issue.
     
  7. As far as i can remember AsyncPlayerPreLogin event won't fire in offline mode.
     

  8. Someone on the IRC said that if I use spigot it should work. I might try it tonight!

    **EDIT** Guess what! Changing to Spigot Worked!
     
    #8 Haun1400, Aug 22, 2013
    Last edited: Aug 22, 2013
    • Funny Funny x 1
  9. :| this makes absolutely no sense. Oh well, if it works, what can I say.
     
    • Agree Agree x 2