Shop limit "-1" should be displayed as "∞"

This commit is contained in:
Eric 2016-08-03 16:24:09 +02:00
parent 67c87cef90
commit da025ab7c8

View File

@ -122,8 +122,9 @@ class ShopCommand extends BukkitCommand {
} else if (args[0].equalsIgnoreCase("limits")) {
if (perm.has(p, "shopchest.limits")) {
plugin.debug(p.getName() + " is viewing his shop limits: " + shopUtils.getShopAmount(p) + "/" + shopUtils.getShopLimit(p));
int limit = shopUtils.getShopLimit(p);
p.sendMessage(LanguageUtils.getMessage(LocalizedMessage.Message.OCCUPIED_SHOP_SLOTS,
new LocalizedMessage.ReplacedRegex(Regex.LIMIT, String.valueOf(shopUtils.getShopLimit(p))),
new LocalizedMessage.ReplacedRegex(Regex.LIMIT, (limit < 0 ? "" : String.valueOf(limit))),
new LocalizedMessage.ReplacedRegex(Regex.AMOUNT, String.valueOf(shopUtils.getShopAmount(p)))));
return true;