[SPIGOT-4195] Creating a PLAYER_HEAD for a player that has no known name on the server has no skin Created: 30/Jul/18 Updated: 30/Jul/18 |
|
Status: | Open |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Brokkonaut | Assignee: | Unassigned |
Resolution: | Unresolved | Votes: | 0 |
Labels: | 1.13, blocks, playerhead,, skin, skull |
Attachments: |
![]() ![]() |
Version: | CraftBukkit version git-Spigot-69774b3-8592585 (MC: 1.13) (Implementing API version 1.13-R0.1-SNAPSHOT) |
Guidelines Read: | Yes |
Description |
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). |
Comments |
Comment by Brokkonaut [ 30/Jul/18 ] |
The same bug also exists in 1.12.2 |
Comment by md_5 [ 30/Jul/18 ] |
And 1.12.2? |