Hey! I am having trouble making an Animal have a custom name (Like when your naming a animal from a anvil). I have NO clue how to do this! Please help! This is what I have so far to spawn an animal! Location location = player.getLocation(); player.getWorld().spawnCreature(location, EntityType.PIG);
Next time use google first ("Bukkit set entity name")... Code:java Pig pig = (Pig) player.getWorld().spawnEntity(location, EntityType.PIG); pig.setCustomName("OinkOink"); // If you want to see it from far awaypig.setCustomNameVisible(true);