Module moe.maple.script.api
Class StyleAndColorBuilder<Builder extends StyleAndColorBuilder<Builder>>
java.lang.Object
moe.maple.api.script.util.builder.StyleAndColorBuilder<Builder>
- Type Parameters:
Builder- A Builder class
- Direct Known Subclasses:
ScriptMenuBuilder
public abstract class StyleAndColorBuilder<Builder extends StyleAndColorBuilder<Builder>> extends Object
- Author:
- umbreon22
-
Field Summary
Fields Modifier and Type Field Description protected FontColorcurrentColorprotected FontStylecurrentStyle -
Constructor Summary
Constructors Constructor Description StyleAndColorBuilder() -
Method Summary
Modifier and Type Method Description abstract Builderappend(CharSequence text)Appends text, duh.Builderblack()Builderblue()Builderbold()abstract Builderget()4000 IQ plays here.protected FontColorgetColorSafe(FontColor def)A safe way of retrieving aFontColor.protected FontStylegetStyleSafe(FontStyle def)A safe way of retrieving aFontStyle.Buildergreen()Buildernormal()Builderpurple()Builderred()BuildersetColor(FontColor color)Sets the currentFontColorand appends it'sFontColor.prefix.BuildersetStyle(FontStyle style)Sets the currentFontStyleand appends it'sFontStyle.prefix.
-
Field Details
-
Constructor Details
-
StyleAndColorBuilder
public StyleAndColorBuilder()
-
-
Method Details
-
getColorSafe
A safe way of retrieving aFontColor.- Parameters:
def- A default value.- Returns:
- The current color, or def.
-
getStyleSafe
A safe way of retrieving aFontStyle.- Parameters:
def- A default value.- Returns:
- The current style, or def.
-
bold
-
normal
-
black
-
blue
-
purple
-
green
-
red
-
setColor
Sets the currentFontColorand appends it'sFontColor.prefix.- Parameters:
color- A valid client color prefix.- Returns:
- A Builder
-
setStyle
Sets the currentFontStyleand appends it'sFontStyle.prefix.- Parameters:
style- A valid client color prefix.- Returns:
- A Builder
-
append
Appends text, duh.- Parameters:
text- A sequence of characters, probably.- Returns:
- A Builder
-
get
4000 IQ plays here.- Returns:
- this
-