Package net.citizensnpcs.trait.versioned
Class TextDisplayTrait
java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.trait.versioned.TextDisplayTrait
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
display
(CommandContext args, CommandSender sender, NPC npc, Boolean shadowed, Boolean seethrough, Integer lineWidth, String text, Color bgcolor, TextDisplay.TextAlignment alignment) void
onSpawn()
Called when anNPC
is spawned.void
setAlignment
(TextDisplay.TextAlignment alignment) void
setBackgroundColor
(Color bgcolor) void
setLineWidth
(Integer lineWidth) void
setSeeThrough
(Boolean seeThrough) void
setShadowed
(Boolean shadowed) void
-
Constructor Details
-
TextDisplayTrait
public TextDisplayTrait()
-
-
Method Details
-
onSpawn
public void onSpawn()Description copied from class:Trait
Called when anNPC
is 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
-