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:HUDBuilder
Sets the X coordinate of the element.- Specified by:
x
in interfaceHUDBuilder<TextBuilder>
- Parameters:
x
- X coordinate, in pixels- Returns:
- this class, for chaining
-
y
Description copied from interface:HUDBuilder
Sets the Y coordinate of the element.- Specified by:
y
in interfaceHUDBuilder<TextBuilder>
- Parameters:
y
- Y coordinate, in pixels- Returns:
- this class, for chaining
-
argb
Description copied from interface:HUDBuilder
Sets the color of the element using ARGB format.- Specified by:
argb
in interfaceHUDBuilder<TextBuilder>
- Parameters:
color
- Color in ARGB- Returns:
- this class, for chaining
-
duration
Description copied from interface:HUDBuilder
Sets the duration the element should be displayed for.- Specified by:
duration
in 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:InstructionBuilder
Builds the instruction.- Specified by:
build
in interfaceInstructionBuilder
- Returns:
- Constructed Instruction for this Builder
-