Display '∞' instead of '-1' in the shop limits message

This commit is contained in:
Eric 2016-06-05 18:53:46 +02:00
parent b423fbd98b
commit 1666051eb8

View File

@ -373,7 +373,7 @@ public class Config {
} }
public static String occupied_shop_slots(int limit, int amount) { public static String occupied_shop_slots(int limit, int amount) {
return plugin.getConfig().getString("messages.occupied-shop-slots").replace(Regex.limit, String.valueOf(limit)).replace(Regex.amount, String.valueOf(amount)).replaceAll("(&([a-f0-9k-or]))", "\u00A7$2"); return plugin.getConfig().getString("messages.occupied-shop-slots").replace(Regex.limit, (limit == -1) ? "" : String.valueOf(limit)).replace(Regex.amount, String.valueOf(amount)).replaceAll("(&([a-f0-9k-or]))", "\u00A7$2");
} }
public static String shopInfo_stock(int amount) { public static String shopInfo_stock(int amount) {