NameableTrait
This trait implements most methods in the {@link Nameable} interface. It should only be used by Tiles.
Table of Contents
- $customName : string|null
- addAdditionalSpawnData() : void
- copyDataFromItem() : void
- getDefaultName() : string
- getName() : string
- hasName() : bool
- setName() : void
- loadName() : void
- saveName() : void
Properties
$customName
private
string|null
$customName
= null
Methods
addAdditionalSpawnData()
public
addAdditionalSpawnData(CompoundTag $nbt) : void
Parameters
- $nbt : CompoundTag
Return values
void —copyDataFromItem()
public
copyDataFromItem(Item $item) : void
Parameters
- $item : Item
Tags
Return values
void —getDefaultName()
public
abstract getDefaultName() : string
Return values
string —getName()
public
getName() : string
Return values
string —hasName()
public
hasName() : bool
Return values
bool —setName()
public
setName(string $name) : void
Parameters
- $name : string
Return values
void —loadName()
protected
loadName(CompoundTag $tag) : void
Parameters
- $tag : CompoundTag
Return values
void —saveName()
protected
saveName(CompoundTag $tag) : void
Parameters
- $tag : CompoundTag