public interface Nameable
Modifier and Type | Method and Description |
---|---|
net.kyori.adventure.text.Component |
customName()
Gets the custom name.
|
void |
customName(net.kyori.adventure.text.Component customName)
Sets the custom name.
|
@Nullable String |
getCustomName()
Gets the custom name on a mob or block.
|
void |
setCustomName(@Nullable String name)
Sets a custom name on a mob or block.
|
@Nullable net.kyori.adventure.text.Component customName()
This value has no effect on players, they will always use their real name.
void customName(@Nullable net.kyori.adventure.text.Component customName)
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.
customName
- the custom name to set@Nullable @Nullable String getCustomName()
This value has no effect on players, they will always use their real name.
void setCustomName(@Nullable @Nullable String name)
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.
name
- the name to setCopyright © 2021. All rights reserved.