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()voidonSpawn()Called when anNPCis 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
-
onSpawn
public void onSpawn()Description copied from class:TraitCalled when anNPCis spawned.NPC.getEntity()will return null until this is called. This is also called onAttach when the NPC is already spawned. -
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
-