Class TextBuilder
java.lang.Object
xyz.gmitch215.socketmc.instruction.builder.TextBuilder
- All Implemented Interfaces:
HUDBuilder<TextBuilder>,InstructionBuilder
Builder for
Instruction.DRAW_TEXT.-
Method Summary
Modifier and TypeMethodDescriptionargb(int color) Sets the color of the element using ARGB format.build()Builds the instruction.dropShadow(boolean dropShadow) Sets whether the text should have a drop shadow.duration(long millis) Sets the duration the element should be displayed for.Sets the text to be displayed.x(int x) Sets the X coordinate of the element.y(int y) Sets the Y coordinate of the element.
-
Method Details
-
x
Description copied from interface:HUDBuilderSets the X coordinate of the element.- Specified by:
xin interfaceHUDBuilder<TextBuilder>- Parameters:
x- X coordinate, in pixels- Returns:
- this class, for chaining
-
y
Description copied from interface:HUDBuilderSets the Y coordinate of the element.- Specified by:
yin interfaceHUDBuilder<TextBuilder>- Parameters:
y- Y coordinate, in pixels- Returns:
- this class, for chaining
-
argb
Description copied from interface:HUDBuilderSets the color of the element using ARGB format.- Specified by:
argbin interfaceHUDBuilder<TextBuilder>- Parameters:
color- Color in ARGB- Returns:
- this class, for chaining
-
duration
Description copied from interface:HUDBuilderSets the duration the element should be displayed for.- Specified by:
durationin interfaceHUDBuilder<TextBuilder>- Parameters:
millis- Duration, in milliseconds- Returns:
- this class, for chaining
-
text
Sets the text to be displayed.- Parameters:
text- Text- Returns:
- this class, for chaining
-
dropShadow
Sets whether the text should have a drop shadow.- Parameters:
dropShadow- Drop shadow- Returns:
- this class, for chaining
-
build
Description copied from interface:InstructionBuilderBuilds the instruction.- Specified by:
buildin interfaceInstructionBuilder- Returns:
- Constructed Instruction for this Builder
-