mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 08:59:01 +00:00
@@ -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 ********* */
|
||||
|
||||
@@ -129,6 +129,15 @@ public class LegacyUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isBottle(Material type) {
|
||||
if (type == Material.POTION) return true;
|
||||
if (!P.use1_9) return false;
|
||||
if (type == Material.LINGERING_POTION || type == Material.SPLASH_POTION) return true;
|
||||
if (!P.use1_13) return false;
|
||||
if (type == Material.EXPERIENCE_BOTTLE) return true;
|
||||
return type.name().equals("HONEY_BOTTLE");
|
||||
}
|
||||
|
||||
public static boolean areStairsInverted(Block block) {
|
||||
if (!P.use1_13) {
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
Reference in New Issue
Block a user