Class IntelligentItemColor.Builder
java.lang.Object
io.github.rysefoxx.inventory.plugin.content.IntelligentItemColor.Builder
- Enclosing class:
IntelligentItemColor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull IntelligentItemColor.Builderbold()With this method, the letter will be bold.@Nullable IntelligentItemColorbuild()@NotNull IntelligentItemColor.BuilderbukkitColor(@NotNull org.bukkit.ChatColor bukkitColor) The letter gets this color@NotNull IntelligentItemColor.BuilderbungeeColor(net.md_5.bungee.api.ChatColor bungeeColor) The letter gets this color@NotNull IntelligentItemColor.BuildercolorByChar(char number) The letter gets this color@NotNull IntelligentItemColor.BuilderThe letter gets this color@NotNull IntelligentItemColor.Builderitalic()With this method, the letter will be italic.@NotNull IntelligentItemColor.BuilderWith this method, the letter will be obfuscated.@NotNull IntelligentItemColor.BuilderThe letter gets this color@NotNull IntelligentItemColor.BuilderrgbColor(int red, int green, int blue) The letter gets this color@NotNull IntelligentItemColor.BuilderIn this method, the letter is displayed crossed out.@NotNull IntelligentItemColor.BuilderWith this method, the letter will be underlined.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
bold
With this method, the letter will be bold.- Returns:
- The Builder to perform further editing.
-
strikeThrough
In this method, the letter is displayed crossed out.- Returns:
- The Builder to perform further editing.
-
underline
With this method, the letter will be underlined.- Returns:
- The Builder to perform further editing.
-
italic
With this method, the letter will be italic.- Returns:
- The Builder to perform further editing.
-
obfuscate
With this method, the letter will be obfuscated.- Returns:
- The Builder to perform further editing.
-
bukkitColor
@NotNull public @NotNull IntelligentItemColor.Builder bukkitColor(@NotNull @NotNull org.bukkit.ChatColor bukkitColor) The letter gets this color- Parameters:
bukkitColor- ChatColor from org.bukkit- Returns:
- The Builder to perform further editing.
-
bungeeColor
@NotNull public @NotNull IntelligentItemColor.Builder bungeeColor(@NotNull net.md_5.bungee.api.ChatColor bungeeColor) throws IllegalArgumentException The letter gets this color- Parameters:
bungeeColor- ChatColor from net.md_5.bungee.api- Returns:
- The Builder to perform further editing.
- Throws:
IllegalArgumentException- If the parameter is not a valid color.
-
rgbColor
@NotNull public @NotNull IntelligentItemColor.Builder rgbColor(@Nonnegative int red, @Nonnegative int green, @Nonnegative int blue) throws IllegalArgumentException, UnsupportedClassVersionError The letter gets this color- Parameters:
red- The red value of the color.green- The green value of the color.blue- The blue value of the color.- Returns:
- The Builder to perform further editing
- Throws:
IllegalArgumentException- If one of the parameters is greater than 255UnsupportedClassVersionError- If the server is running under 1.16.
-
colorByChar
@NotNull public @NotNull IntelligentItemColor.Builder colorByChar(char number) throws NullPointerException The letter gets this color- Parameters:
number- e.g 4 for DARK_RED- Returns:
- The Builder to perform further editing
- Throws:
NullPointerException- if an invalid character was passed.Transfer a char from the ChatColor of org.bukkit
-
paragraph
@NotNull public @NotNull IntelligentItemColor.Builder paragraph(@NotNull @NotNull String paragraph) throws IllegalArgumentException, NullPointerException The letter gets this color- Parameters:
paragraph- e.g ยง4 for DARK_RED- Returns:
- The Builder to perform further editing
- Throws:
IllegalArgumentException- if the parameter is not invalid.NullPointerException- if no ChatColor could be found.
-
hexColor
@NotNull public @NotNull IntelligentItemColor.Builder hexColor(@NotNull @NotNull String hexColor) throws IllegalArgumentException, UnsupportedClassVersionError The letter gets this color- Parameters:
hexColor- e.g #FF0000 for RED- Returns:
- The Builder to perform further editing
- Throws:
IllegalArgumentException- If it is not a valid hex string.UnsupportedClassVersionError- If the server is running under 1.16.
-
build
-