Diese Klasse importieren

Link to diese-klasse-importieren

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
Copy
import crafttweaker.api.entity.NamePlateResult;

Name: getContent

Gets the current content of the nameplate. This can be changed by mods.

Returns: The current nameplate content.
Return Type: MCTextComponent

ZenScript
Copy
// NamePlateResult.getContent() as MCTextComponent

myNamePlateResult.getContent();

Link to getOriginalContent

Name: getOriginalContent

Gets the original content of the nameplate. This can not be changed by mods.

Returns: The original nameplate content.
Return Type: MCTextComponent

ZenScript
Copy
// NamePlateResult.getOriginalContent() as MCTextComponent

myNamePlateResult.getOriginalContent();

Name: setAllow

Forces the nameplate to be visible even when it would otherwise not be.

Return Type: void

ZenScript
Copy
// NamePlateResult.setAllow() as void

myNamePlateResult.setAllow();

Name: setContent

Sets the new content of the nameplate.

Return Type: void

ZenScript
Copy
NamePlateResult.setContent(content as MCTextComponent) as void
ParameterTypeBeschreibung
Parameter
inhalt
Type
MCTextkomponente
Beschreibung
The new nameplate contents.

Name: setDefault

Sets the default vanilla behaviour of rendering nameplates.

Return Type: void

ZenScript
Copy
// NamePlateResult.setDefault() as void

myNamePlateResult.setDefault();

Name: setDeny

Forces the display name to not render even when it should.

Return Type: void

ZenScript
Copy
// NamePlateResult.setDeny() as void

myNamePlateResult.setDeny();
NameTypeHas GetterHas SetterBeschreibung
Name
inhalt
Type
MCTextkomponente
Has Getter
true
Has Setter
true
Beschreibung
Gets the current content of the nameplate.
This can be changed by mods.
Name
originalContent
Type
MCTextkomponente
Has Getter
true
Has Setter
false
Beschreibung
Gets the original content of the nameplate.
This can not be changed by mods.