Package me.hsgamer.bettergui.util
Class StringReplacerApplier
- java.lang.Object
-
- me.hsgamer.bettergui.util.StringReplacerApplier
-
public final class StringReplacerApplier extends Object
A utility class to apply StringReplacer
-
-
Field Summary
Fields Modifier and Type Field Description static StringReplacerCOLORIZEA replacer to colorize the string
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ItemBuilderapply(ItemBuilder itemBuilder, boolean useGlobalVariableManager)Apply the string replacers to the item builderstatic ItemBuilderapply(ItemBuilder itemBuilder, Menu menu)Apply the string replacers to the item builderstatic ItemBuilderapply(ItemBuilder itemBuilder, MenuElement menuElement)Apply the string replacers to the item builderstatic LinkedHashMap<String,StringReplacer>getStringReplacerMap()Get a mutable map of string replacersstatic Stringreplace(String string, UUID uuid, boolean useGlobalVariableManager)Apply the string replacers to the stringstatic Stringreplace(String string, UUID uuid, Menu menu)Apply the string replacers to the stringstatic Stringreplace(String string, UUID uuid, MenuElement menuElement)Apply the string replacers to the string
-
-
-
Field Detail
-
COLORIZE
public static final StringReplacer COLORIZE
A replacer to colorize the string
-
-
Method Detail
-
getStringReplacerMap
public static LinkedHashMap<String,StringReplacer> getStringReplacerMap()
Get a mutable map of string replacers- Returns:
- the map
-
apply
public static ItemBuilder apply(ItemBuilder itemBuilder, boolean useGlobalVariableManager)
Apply the string replacers to the item builder- Parameters:
itemBuilder- the item builderuseGlobalVariableManager- whether to use the global variable manager- Returns:
- the item builder
-
apply
public static ItemBuilder apply(ItemBuilder itemBuilder, Menu menu)
Apply the string replacers to the item builder- Parameters:
itemBuilder- the item buildermenu- the menu- Returns:
- the item builder
-
apply
public static ItemBuilder apply(ItemBuilder itemBuilder, MenuElement menuElement)
Apply the string replacers to the item builder- Parameters:
itemBuilder- the item buildermenuElement- the menu element- Returns:
- the item builder
-
replace
public static String replace(String string, UUID uuid, boolean useGlobalVariableManager)
Apply the string replacers to the string- Parameters:
string- the stringuuid- the unique iduseGlobalVariableManager- whether to use the global variable manager- Returns:
- the replaced string
-
replace
public static String replace(String string, UUID uuid, Menu menu)
Apply the string replacers to the string- Parameters:
string- the stringuuid- the unique idmenu- the menu- Returns:
- the replaced string
-
replace
public static String replace(String string, UUID uuid, MenuElement menuElement)
Apply the string replacers to the string- Parameters:
string- the stringuuid- the unique idmenuElement- the menu element- Returns:
- the replaced string
-
-