Package org.bukkit

Interface Nameable

All Known Subinterfaces:
AbstractArrow, AbstractHorse, AbstractVillager, Ageable, Ambient, Animals, AreaEffectCloud, ArmorStand, Arrow, Barrel, Bat, Beacon, Bee, BlastFurnace, Blaze, Boat, Boss, Breedable, BrewingStand, Cat, CaveSpider, Chest, ChestedHorse, Chicken, Cod, CommandMinecart, ComplexEntityPart, ComplexLivingEntity, Container, Cow, Creature, Creeper, Damageable, Dispenser, Dolphin, Donkey, DragonFireball, Dropper, Drowned, Egg, ElderGuardian, EnchantingTable, EnderCrystal, EnderDragon, EnderDragonPart, Enderman, Endermite, EnderPearl, EnderSignal, Entity, Evoker, EvokerFangs, ExperienceOrb, Explosive, ExplosiveMinecart, FallingBlock, Fireball, Firework, Fish, FishHook, Flying, Fox, Furnace, Ghast, Giant, Golem, Guardian, Hanging, Hoglin, Hopper, HopperMinecart, Horse, HumanEntity, Husk, Illager, Illusioner, IronGolem, Item, ItemFrame, LargeFireball, LeashHitch, LightningStrike, LingeringPotion, LivingEntity, Llama, LlamaSpit, MagmaCube, Minecart, Mob, Monster, Mule, MushroomCow, NPC, Ocelot, Painting, Panda, Parrot, Phantom, Pig, Piglin, PiglinAbstract, PiglinBrute, PigZombie, Pillager, Player, PolarBear, PoweredMinecart, Projectile, PufferFish, Rabbit, Raider, RangedEntity, Ravager, RideableMinecart, Salmon, Sheep, Shulker, ShulkerBox, ShulkerBullet, Silverfish, SizedFireball, Skeleton, SkeletonHorse, Slime, SmallFireball, Smoker, Snowball, Snowman, SpawnerMinecart, SpectralArrow, Spellcaster, Spider, SplashPotion, Squid, Steerable, StorageMinecart, Stray, Strider, Tameable, ThrowableProjectile, ThrownExpBottle, ThrownPotion, TippedArrow, TNTPrimed, TraderLlama, Trident, TropicalFish, Turtle, Vehicle, Vex, Villager, Vindicator, WanderingTrader, WaterMob, Witch, Wither, WitherSkeleton, WitherSkull, Wolf, Zoglin, Zombie, ZombieHorse, ZombieVillager

public interface Nameable
  • Method Details

    • customName

      @Nullable Component customName()
      Gets the custom name.

      This value has no effect on players, they will always use their real name.

      Returns:
      the custom name
    • customName

      void customName(@Nullable Component customName)
      Sets the custom name.

      This name will be used in death messages and can be sent to the client as a nameplate over the mob.

      Setting the name to null will clear it.

      This value has no effect on players, they will always use their real name.

      Parameters:
      customName - the custom name to set
    • getCustomName

      @Nullable @Nullable String getCustomName()
      Gets the custom name on a mob or block. If there is no name this method will return null.

      This value has no effect on players, they will always use their real name.

      Returns:
      name of the mob/block or null
    • setCustomName

      void setCustomName(@Nullable @Nullable String name)
      Sets a custom name on a mob or block. This name will be used in death messages and can be sent to the client as a nameplate over the mob.

      Setting the name to null or an empty string will clear it.

      This value has no effect on players, they will always use their real name.

      Parameters:
      name - the name to set