Nameable
Link to nameable
Importing the class
Link to importing-the-class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
ZenScript Copyimport crafttweaker.api.world.Nameable;
Methods
Link to methods
Name: getCustomName
Return Type: Component?
ZenScript Copy// Nameable.getCustomName() as Component?
myNameable.getCustomName();
Name: getDisplayName
Return Type: Component
ZenScript Copy// Nameable.getDisplayName() as Component
myNameable.getDisplayName();
Name: getName
Return Type: Component
ZenScript Copy// Nameable.getName() as Component
myNameable.getName();
Name: hasCustomName
Return Type: boolean
ZenScript Copy// Nameable.hasCustomName() as boolean
myNameable.hasCustomName();
Properties
Link to properties
이름 | Type | Has Getter | Has Setter |
---|---|---|---|
이름 customName | Type Component? | Has Getter true | Has Setter false |
이름 displayName | Type Component | Has Getter true | Has Setter false |
이름 hasCustomName | Type boolean | Has Getter true | Has Setter false |
이름 name | Type Component | Has Getter true | Has Setter false |