Solved Database with Bungee and Bukkit

Discussion in 'Spigot Plugin Development' started by EwrsPlay, Mar 9, 2020.

  1. Hey. I have a licensed server. In BungeeCord, with LoginEvent, I register the player in the database in an asynchronous thread, but by the time he connects to bukkit, he has not yet been created in the database and an error (null) is received. I don’t know what to do with it.
    As a result, I have to kick the player from the server and only from the second input can he log in, since by that moment he is already registered in the database
  2. SteelPhoenix


    As far as I know you can use PreLoginEvent or whatever it's called (can't remember). It is an async event so you can do your db queries without blocking the proxy and the player wont connect until the query is completed.
  3. As far as I know, at this moment uuid player null
    Although in theory I can replace it with my callback
  4. No you can get the player info in this event
  5. Thanks, I solved my problem. Using Reflection, I replaced the callback in my event with my own and everything turned out