Package net.citizensnpcs.trait.versioned
Class TextDisplayTrait
java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.trait.versioned.TextDisplayTrait
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddisplay(CommandContext args, CommandSender sender, NPC npc, Boolean shadowed, Boolean seethrough, Integer lineWidth, String text, Color bgcolor, TextDisplay.TextAlignment alignment) getText()voidCalled just before theNPCis spawned.voidsetAlignment(TextDisplay.TextAlignment alignment) voidsetBackgroundColor(Color bgcolor) voidsetLineWidth(Integer lineWidth) voidsetSeeThrough(Boolean seeThrough) voidsetShadowed(Boolean shadowed) void
-
Constructor Details
-
TextDisplayTrait
public TextDisplayTrait()
-
-
Method Details
-
getAlignment
-
getBackgroundColor
-
getLineWidth
-
getText
-
isSeeThrough
-
isShadowed
-
onPreSpawn
public void onPreSpawn()Description copied from class:TraitCalled just before theNPCis spawned.NPC.getEntity()will return an unspawned entity.- Overrides:
onPreSpawnin classTrait
-
setAlignment
-
setBackgroundColor
-
setLineWidth
-
setSeeThrough
-
setShadowed
-
setText
-
display
public static void display(CommandContext args, CommandSender sender, NPC npc, Boolean shadowed, Boolean seethrough, Integer lineWidth, String text, Color bgcolor, TextDisplay.TextAlignment alignment) throws CommandException - Throws:
CommandException
-