Class CustomFilter
java.lang.Object
studio.magemonkey.codex.mccore.config.CustomFilter
A custom filter to apply to language messages
This can be used to insert data such as player names, stats, or other data
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionApplies the filter to the stringvoidapply(StringBuilder sb) Applies the filter to the string builderGets the replacement string of the filtergetToken()Gets the token string of the filtersetReplacement(String replacement) Sets the replacement string for the filter
-
Constructor Details
-
CustomFilter
Creates a new custom filter
- Parameters:
token- string to search for to replace (e.g. "{player}")replacement- string to replace the token with (e.g. "Bob")
-
-
Method Details
-
getToken
Gets the token string of the filter- Returns:
- token string
-
getReplacement
Gets the replacement string of the filter- Returns:
- replacement string
-
setReplacement
Sets the replacement string for the filter- Parameters:
replacement- replacement
-
apply
Applies the filter to the string- Parameters:
string- string to apply to
-
apply
Applies the filter to the string builder- Parameters:
sb- string builder to apply to
-