Getting an Offline Player's UUID on a BungeeCord Server

Discussion in 'Spigot Plugin Development' started by magicmq, May 26, 2015.

  1. Hello Spigot, I have a network in which I am developing for that requires a system where I will need to save data into an SQL database, accompanied by a player's UUID, whether they are online or offline. This system will need to work across multiple servers.

    My problem is that I am not sure if Bukkit.getOfflinePlayer().getUniqueId() returns the correct UUID. From what I understood before, Spigot correctly returned the player's online UUID, even though the server was in offline mode to compensate for BungeeCord, but now, I am not entirely sure if that is the case.

    Before I code an HTTP system to get the player's UUID through Mojang's auth servers, I want to make sure that Bukkit.getOfflinePlayer().getUniqueId() does not do what I want it to do, which is get the player's UUID from Mojang, even though the server is technically in offline mode, due to BungeeCord.

    Does that method in OfflinePlayer actually return an OfflinePlayer's online UUID from Mojang's servers even though the server is in offline mode? (Again, this is using Spigot, not Bukkit.)

    Thanks for the help.
     
  2. Serializator

    Supporter

    If you set 'ip_forward' in the BungeeCord configuration to 'true' and 'bungee' in the Spigot configuration to 'true' it should return the correct UUID.