Package org.bukkit
Interface Nameable
- All Known Subinterfaces:
AbstractArrow
,AbstractHorse
,AbstractSkeleton
,AbstractVillager
,Ageable
,Allay
,Ambient
,Animals
,AreaEffectCloud
,ArmorStand
,Arrow
,Axolotl
,Banner
,Barrel
,Bat
,Beacon
,Bee
,BlastFurnace
,Blaze
,BlockDisplay
,Boat
,Boss
,Breedable
,BrewingStand
,Bucketable
,Camel
,Cat
,CaveSpider
,Chest
,ChestBoat
,ChestedHorse
,Chicken
,Cod
,CollarColorable
,CommandMinecart
,ComplexEntityPart
,ComplexLivingEntity
,Container
,Cow
,Creature
,Creeper
,Damageable
,Dispenser
,Display
,Dolphin
,Donkey
,DragonFireball
,Dropper
,Drowned
,Egg
,ElderGuardian
,EnchantingTable
,EnderCrystal
,EnderDragon
,EnderDragonPart
,Enderman
,Endermite
,EnderPearl
,EnderSignal
,Enemy
,Entity
,Evoker
,EvokerFangs
,ExperienceOrb
,Explosive
,ExplosiveMinecart
,FallingBlock
,Fireball
,Firework
,Fish
,FishHook
,Flying
,Fox
,Frog
,Furnace
,Ghast
,Giant
,GlowItemFrame
,GlowSquid
,Goat
,Golem
,Guardian
,Hanging
,Hoglin
,Hopper
,HopperMinecart
,Horse
,HumanEntity
,Husk
,Illager
,Illusioner
,Interaction
,IronGolem
,Item
,ItemDisplay
,ItemFrame
,LargeFireball
,LeashHitch
,LightningStrike
,LingeringPotion
,LivingEntity
,Llama
,LlamaSpit
,LockableTileState
,MagmaCube
,Marker
,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
,SchoolableFish
,Shearable
,Sheep
,Shulker
,ShulkerBox
,ShulkerBullet
,Silverfish
,SizedFireball
,Skeleton
,SkeletonHorse
,Slime
,SmallFireball
,Smoker
,Sniffer
,Snowball
,Snowman
,SpawnerMinecart
,SpectralArrow
,Spellcaster
,Spider
,SplashPotion
,Squid
,Steerable
,StorageMinecart
,Stray
,Strider
,Tadpole
,Tameable
,TextDisplay
,ThrowableProjectile
,ThrownExpBottle
,ThrownPotion
,TippedArrow
,TNTPrimed
,TraderLlama
,Trident
,TropicalFish
,Turtle
,Vehicle
,Vex
,Villager
,Vindicator
,WanderingTrader
,Warden
,WaterMob
,Witch
,Wither
,WitherSkeleton
,WitherSkull
,Wolf
,Zoglin
,Zombie
,ZombieHorse
,ZombieVillager
public interface Nameable
-
Method Summary
Modifier and TypeMethodDescriptionGets the custom name.void
customName
(@Nullable Component customName) Sets the custom name.Deprecated.void
setCustomName
(@Nullable String name) Deprecated.in favour ofcustomName(net.kyori.adventure.text.Component)
-
Method Details
-
customName
Gets the custom name.This value has no effect on players, they will always use their real name.
- Returns:
- the custom name
-
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
Deprecated.in favour ofcustomName()
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
Deprecated.in favour ofcustomName(net.kyori.adventure.text.Component)
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
-
customName()