From da025ab7c84f2f4e732110f3247cc1fda935b85c Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 3 Aug 2016 16:24:09 +0200 Subject: [PATCH] =?UTF-8?q?Shop=20limit=20"-1"=20should=20be=20displayed?= =?UTF-8?q?=20as=20"=E2=88=9E"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ShopChest/src/main/java/de/epiceric/shopchest/ShopCommand.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ShopChest/src/main/java/de/epiceric/shopchest/ShopCommand.java b/ShopChest/src/main/java/de/epiceric/shopchest/ShopCommand.java index 068de55..c180591 100644 --- a/ShopChest/src/main/java/de/epiceric/shopchest/ShopCommand.java +++ b/ShopChest/src/main/java/de/epiceric/shopchest/ShopCommand.java @@ -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;