diff --git a/src/main/java/org/maxgamer/QuickShop/Shop/ContainerShop.java b/src/main/java/org/maxgamer/QuickShop/Shop/ContainerShop.java index a09340f..e84ce6a 100644 --- a/src/main/java/org/maxgamer/QuickShop/Shop/ContainerShop.java +++ b/src/main/java/org/maxgamer/QuickShop/Shop/ContainerShop.java @@ -601,10 +601,12 @@ public class ContainerShop implements Shop { final String[] lines = new String[4]; lines[0] = ChatColor.RED + "[QuickShop]"; if (this.isBuying()) { - lines[1] = MsgUtil.p("signs.buying", "" + this.getRemainingSpace()); + final int remsp = this.getRemainingSpace(); + lines[1] = MsgUtil.p("signs.buying", "" + (remsp == 10000 ? "无限" : remsp)); } if (this.isSelling()) { - lines[1] = MsgUtil.p("signs.selling", "" + this.getRemainingStock()); + final int remst = this.getRemainingStock(); + lines[1] = MsgUtil.p("signs.selling", "" + (remst == 10000 ? "无限" : remst)); } lines[2] = Util.getNameForSign(this.item); lines[3] = MsgUtil.p("signs.price", "" + this.getPrice()); diff --git a/src/main/java/org/maxgamer/QuickShop/Util/MsgUtil.java b/src/main/java/org/maxgamer/QuickShop/Util/MsgUtil.java index 15b647b..fd96c2a 100644 --- a/src/main/java/org/maxgamer/QuickShop/Util/MsgUtil.java +++ b/src/main/java/org/maxgamer/QuickShop/Util/MsgUtil.java @@ -181,10 +181,10 @@ public class MsgUtil { p.sendMessage(ChatColor.DARK_PURPLE + "| " + MsgUtil.p("menu.damage-percent-remaining", Util.getToolPercentage(items))); } if (shop.isSelling()) { - p.sendMessage(ChatColor.DARK_PURPLE + "| " + MsgUtil.p("menu.stock", "" + stock)); + p.sendMessage(ChatColor.DARK_PURPLE + "| " + MsgUtil.p("menu.stock", "" + (stock == 10000 ? "无限" : stock))); } else { final int space = shop.getRemainingSpace(); - p.sendMessage(ChatColor.DARK_PURPLE + "| " + MsgUtil.p("menu.space", "" + space)); + p.sendMessage(ChatColor.DARK_PURPLE + "| " + MsgUtil.p("menu.space", "" + (space == 10000 ? "无限" : space))); } p.sendMessage(ChatColor.DARK_PURPLE + "| " + MsgUtil.p("menu.price-per", shop.getDataName(), Util.format(shop.getPrice()))); if (shop.isBuying()) {