Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-4195

Creating a PLAYER_HEAD for a player that has no known name on the server has no skin

XMLWordPrintable

    • CraftBukkit version git-Spigot-69774b3-8592585 (MC: 1.13) (Implementing API version 1.13-R0.1-SNAPSHOT)
    • Yes

      public class SkullBug extends JavaPlugin {
          @Override
          public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
              Block b = ((Player) sender).getLocation().getBlock();
              b.setType(Material.PLAYER_HEAD);
              Skull state = (Skull) b.getState();
              state.setOwningPlayer(getServer().getOfflinePlayer(UUID.fromString("f5199770-7192-477d-a600-a3df87960077")));
              state.update();
              return true;
          }
      }
      

      I would expect this skin https://de.namemc.com/profile/f5199770-7192-477d-a600-a3df87960077 but I see the default alex skin.

       

      If offlinePlayer.getName() != null, it works, but not if the name is null (= unknown).

            Unassigned Unassigned
            Brokkonaut Brokkonaut
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: