UUID from OfflinePlayer

Discussion in 'Spigot Discussion' started by FretziLetsPlay, May 4, 2021.

  1. Does anyone know why i can't get the right UUID from an OfflinePlayer anymore?
  2. No i mean that since today the method OfflinePlayer.getUniquiId returns a wrong UUID. I hope you can understand it. Is it possible that there is an issue with the mojang server?
  3. I believe when returning the UUID of an offline player, it just takes it from the world playerdata, so it does nothing with Mojang Servers.
    Maybe you are running your server in offline mode?
  4. i'm using it on a bungeecord network so i think the servers have to be in offline mode.
  5. And another weird thing is that also the player heads from the stats wall doesn't work anymore.
  6. Make sure you have bungee set to true on spigot.yml
    If not the UUIDS will be wrong
  7. And IP Forwarding true on bungee
  8. I use a Cloud System and this is the first time where the bug appears.
    This bug is coming up when i try to set a skull owner:
    Code (Text):
    [22:59:57 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH - git-Paper-547 (MC: 1.16.5) ---

    [22:59:57 ERROR]: The server has not responded for 10 seconds! Creating thread dump

    [22:59:57 ERROR]: ------------------------------

    [22:59:57 ERROR]: Server thread dump (Look for plugins here before reporting to Paper!):

    [22:59:57 ERROR]: ------------------------------

    [22:59:57 ERROR]: Current Thread: Server thread

    [22:59:57 ERROR]: PID: 22 | Suspended: false | Native: false | State: TIMED_WAITING

    [22:59:57 ERROR]: Stack:

    [22:59:57 ERROR]: java.lang.Thread.sleep(Native Method)

    [22:59:57 ERROR]: com.mojang.authlib.yggdrasil.YggdrasilGameProfileRepository.findProfilesByNames(YggdrasilGameProfileRepository.java:93)

    [22:59:57 ERROR]: com.destroystokyo.paper.profile.PaperGameProfileRepository.findProfilesByNames(PaperGameProfileRepository.java:44)

    [22:59:57 ERROR]: net.minecraft.server.v1_16_R3.UserCache.a(UserCache.java:89)

    [22:59:57 ERROR]: net.minecraft.server.v1_16_R3.UserCache.getProfile(UserCache.java:145)

    [22:59:57 ERROR]: org.bukkit.craftbukkit.v1_16_R3.block.CraftSkull.setOwner(CraftSkull.java:76)

    [22:59:57 ERROR]: de.Fretzi.SpeedRunner.mysql.RankingStatsWall.setStatsWall(RankingStatsWall.java:81)

    [22:59:57 ERROR]: de.Fretzi.SpeedRunner.main.Main$1.run(Main.java:122)

    [22:59:57 ERROR]: org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:100)

    [22:59:57 ERROR]: org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:468)

    [22:59:57 ERROR]: net.minecraft.server.v1_16_R3.MinecraftServer.b(MinecraftServer.java:1301)

    [22:59:57 ERROR]: net.minecraft.server.v1_16_R3.DedicatedServer.b(DedicatedServer.java:379)

    [22:59:57 ERROR]: net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1216)

    [22:59:57 ERROR]: net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1004)

    [22:59:57 ERROR]: net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:177)

    [22:59:57 ERROR]: net.minecraft.server.v1_16_R3.MinecraftServer$$Lambda$3055/943749902.run(Unknown Source)

    [22:59:57 ERROR]: java.lang.Thread.run(Thread.java:748)

    [22:59:57 ERROR]: ------------------------------


    [22:59:57 ERROR]: ------------------------------
    #10 FretziLetsPlay, May 4, 2021
    Last edited: May 4, 2021
  9. You could use minecrafts api i think.

    Code (Java):
    UUID selectedplayer = Bukkit.getPlayer("Playername").getUniqueId();
    should do it.
    #11 LeNinjaHD, May 5, 2021
    Last edited: May 5, 2021
  10. Code (Text):
    UUID selectedplayer = Bukkit.getPlayer("Playername").getUniqueId();
  11. Ok but its weird that it works for many month and now it doesn't work anymore.
  12. On my localhost test server it also doens't work anymore.
  13. same here, since today we can't load the correct head data or uuid from offline players
  14. i think there is a problem with a mojang server.
  15. Does anyone know where to report a bug like this?
  16. Code (Text):
    UUID selectedplayer = Bukkit.getPlayer("Playername").getUniqueId();
    So you can also do with a command like this:

    Code (Text):

    Player target = Bukkit.getPlayer(args[0]);
    UUID uuidmessage = Bukkit.getPlayer(target).getUniqueId();
    Player operator = (Player) sender;

    if(target == null){
    operator.sendMessage("§cYou have to select a target!");

    } else {

    operatot.sendMessage("§eThe §cUUID §eof§c" + target.getName() + " §eis§7: §c" + uuidmessage + "§e.");