mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-26 04:12:22 +00:00
Shop limit "-1" should be displayed as "∞"
This commit is contained in:
parent
67c87cef90
commit
da025ab7c8
@ -122,8 +122,9 @@ class ShopCommand extends BukkitCommand {
|
|||||||
} else if (args[0].equalsIgnoreCase("limits")) {
|
} else if (args[0].equalsIgnoreCase("limits")) {
|
||||||
if (perm.has(p, "shopchest.limits")) {
|
if (perm.has(p, "shopchest.limits")) {
|
||||||
plugin.debug(p.getName() + " is viewing his shop limits: " + shopUtils.getShopAmount(p) + "/" + shopUtils.getShopLimit(p));
|
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,
|
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)))));
|
new LocalizedMessage.ReplacedRegex(Regex.AMOUNT, String.valueOf(shopUtils.getShopAmount(p)))));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user