show unlimited numner to chinese...

Signed-off-by: 502647092 <jtb1@163.com>
pull/3/HEAD
502647092 2015-10-17 10:58:06 +08:00
parent b9a9fe292c
commit 5bab17a117
2 changed files with 6 additions and 4 deletions

View File

@ -601,10 +601,12 @@ public class ContainerShop implements Shop {
final String[] lines = new String[4]; final String[] lines = new String[4];
lines[0] = ChatColor.RED + "[QuickShop]"; lines[0] = ChatColor.RED + "[QuickShop]";
if (this.isBuying()) { 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()) { 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[2] = Util.getNameForSign(this.item);
lines[3] = MsgUtil.p("signs.price", "" + this.getPrice()); lines[3] = MsgUtil.p("signs.price", "" + this.getPrice());

View File

@ -181,10 +181,10 @@ public class MsgUtil {
p.sendMessage(ChatColor.DARK_PURPLE + "| " + MsgUtil.p("menu.damage-percent-remaining", Util.getToolPercentage(items))); p.sendMessage(ChatColor.DARK_PURPLE + "| " + MsgUtil.p("menu.damage-percent-remaining", Util.getToolPercentage(items)));
} }
if (shop.isSelling()) { 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 { } else {
final int space = shop.getRemainingSpace(); 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()))); p.sendMessage(ChatColor.DARK_PURPLE + "| " + MsgUtil.p("menu.price-per", shop.getDataName(), Util.format(shop.getPrice())));
if (shop.isBuying()) { if (shop.isBuying()) {