Class PlaceholderUtil
java.lang.Object
net.lewmc.essence.utils.placeholders.PlaceholderUtil
The tag utility replaces tags with preconfigured text (placeholders)
-
Constructor Summary
ConstructorsConstructorDescriptionPlaceholderUtil
(Essence plugin, org.bukkit.command.CommandSender cs) Constructor -
Method Summary
Modifier and TypeMethodDescriptionreplaceAll
(String text) Replaces tags with preconfigured text.replaceSingle
(String placeholder) Converts placeholders into strings.
-
Constructor Details
-
PlaceholderUtil
Constructor- Parameters:
plugin
- Reference to the main Essence class.
-
-
Method Details
-
replaceAll
Replaces tags with preconfigured text. This is used to search for and replace multiple placeholders at a time.- Parameters:
text
- String - Text to search and replace.- Returns:
- String - Resulting String
-
replaceSingle
Converts placeholders into strings. This is used to convert a single placeholder at a time.- Parameters:
placeholder
- String - The placeholder to convert (without the braces)- Returns:
- String - The string the placeholder becomes.
-