Package me.devtec.amazingtags.utils
Class MessageUtils.Placeholders
java.lang.Object
me.devtec.amazingtags.utils.MessageUtils.Placeholders
- Enclosing class:
- MessageUtils
Utility class used in our MessageUtils class methods. Add placeholders like %player%, %money% and this class will handle the replacing!
In String text placeholders looks like %your_placeholder% but "%" is added automatically when you are adding placeholder!!
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMethod used to add new replaceable placeholderaddOffline(String palceholder, String player) Method used to add new replaceable offline player placeholder.Method used to add new replaceable player placeholder.Method used to add new replaceable player placeholder.Method used to apply placeholders in messagestatic MessageUtils.Placeholdersc()Method used to add new replaceable placeholder
-
Constructor Details
-
Placeholders
public Placeholders()
-
-
Method Details
-
c
-
add
Method used to add new replaceable placeholder- Parameters:
placeholder- - Placeholder in the message (example: %player% as player)replace- - What the placeholder should be replaced with- Returns:
- Method returns this instance
-
addPlayer
Method used to add new replaceable player placeholder. Placeholder %player_...% is replaced automatically!- Parameters:
placeholder- - Placeholder in the message (example: %target% as some other player)replace- - Which player the placeholder should be replaced with- Returns:
- Method returns this instance
-
addPlayer
public MessageUtils.Placeholders addPlayer(String placeholder, org.bukkit.command.CommandSender player) Method used to add new replaceable player placeholder. Placeholder %player_...% is replaced automatically!- Parameters:
placeholder- - Placeholder in the message (example: %target% as some other player)replace- - Which player the placeholder should be replaced with- Returns:
- Method returns this instance
-
addOffline
Method used to add new replaceable offline player placeholder. Placeholder %player_...% is replaced automatically!- Parameters:
placeholder- - Placeholder in the message (example: %target% as some other player)replace- - Which player the placeholder should be replaced with- Returns:
- Method returns this instance
-
replace
Method used to add new replaceable placeholder- Parameters:
placeholder- - Placeholder in the message (example: %player% as player)replace- - What the placeholder should be replaced with- Returns:
- Method returns this instance
-
apply
Method used to apply placeholders in message- Parameters:
sender- - The player to whom you are sending the messagetext- - Message where you want to replace placeholdersplaceholders-- Returns:
- Returning edited text
-