Added %quality% placeholder & Bottled Materials

issue #259
This commit is contained in:
Sn0wStorm
2020-04-13 13:52:57 +02:00
parent 2cd52955a0
commit 786a3c5741
19 changed files with 56 additions and 32 deletions
+12
View File
@@ -164,6 +164,18 @@ public class BUtil {
return -1;
}
/**
* Replaces the Placeholders %player_name% and %quality% in the given input string
*
* @param input The String to replace the placeholders in
* @param player Player Name to replace %player_name%
* @param quality Quality to replace %quality%
* @return The String with all placeholders replaced
*/
public static String applyPlaceholders(String input, String player, int quality) {
return input.replaceAll("%player_name%", player).replaceAll("%quality%", String.valueOf(quality));
}
/* **************************************** */
/* ********* ********* */
/* ********* Brewery Utils ********* */