-
Bug
-
Resolution: Invalid
-
Minor
-
None
-
None
-
CraftBukkit version 3085-Spigot-9fb885e-fd905ab (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
-
Yes
Setting a Tameable entity's owner with setOwner() will make the Entity's custom name tag disappear.
For example, the following will spawn a Cat with the custom name, and 30 ticks later will set the owner as the player, which for some reason will remove the name tag. The custom name technically exists (entity.getCustomName()), although the name tag is no longer visible (entity.isCustomNameVisible() is true).
Cat entity = (Cat) player.getLocation().getWorld().spawnEntity(player.getLocation(), EntityType.CAT); entity.setCustomName("Some name"); entity.setCustomNameVisible(true); Bukkit.getScheduler().runTaskLater(plugin, new Runnable() { @Override public void run() { entity.setOwner(player); } }, 30L);