1
0
mirror of https://e.coding.net/circlecloud/QuickShop.git synced 2024-11-22 01:58:54 +00:00

add new info unlimited...

Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
j502647092 2015-10-18 11:39:15 +08:00
parent 7f1c37ec4e
commit 714ce2fa32
2 changed files with 7 additions and 2 deletions

View File

@ -27,8 +27,8 @@ public class CommandInfo extends BaseCommand {
@Override @Override
public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException { public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException {
int buying, selling, doubles, chunks, worlds; int buying, selling, doubles, chunks, worlds, unlimited;
buying = selling = doubles = chunks = worlds = 0; buying = selling = doubles = chunks = worlds = unlimited = 0;
int nostock = 0; int nostock = 0;
sender.sendMessage(ChatColor.RED + "开始检索商店信息中..."); sender.sendMessage(ChatColor.RED + "开始检索商店信息中...");
for (final HashMap<ShopChunk, HashMap<Location, Shop>> inWorld : plugin.getShopManager().getShops().values()) { for (final HashMap<ShopChunk, HashMap<Location, Shop>> inWorld : plugin.getShopManager().getShops().values()) {
@ -36,6 +36,9 @@ public class CommandInfo extends BaseCommand {
for (final HashMap<Location, Shop> inChunk : inWorld.values()) { for (final HashMap<Location, Shop> inChunk : inWorld.values()) {
chunks++; chunks++;
for (final Shop shop : inChunk.values()) { for (final Shop shop : inChunk.values()) {
if (shop.isUnlimited()) {
unlimited++;
}
if (shop.isBuying()) { if (shop.isBuying()) {
buying++; buying++;
} else if (shop.isSelling()) { } else if (shop.isSelling()) {
@ -52,6 +55,7 @@ public class CommandInfo extends BaseCommand {
sender.sendMessage(MsgUtil.p("info.title", chunks, buying + selling, worlds)); sender.sendMessage(MsgUtil.p("info.title", chunks, buying + selling, worlds));
sender.sendMessage(MsgUtil.p("info.selling", selling)); sender.sendMessage(MsgUtil.p("info.selling", selling));
sender.sendMessage(MsgUtil.p("info.buying", buying)); sender.sendMessage(MsgUtil.p("info.buying", buying));
sender.sendMessage(MsgUtil.p("info.unlimited", unlimited));
sender.sendMessage(MsgUtil.p("info.double", doubles)); sender.sendMessage(MsgUtil.p("info.double", doubles));
sender.sendMessage(MsgUtil.p("info.canclean", nostock)); sender.sendMessage(MsgUtil.p("info.canclean", nostock));
} }

View File

@ -58,6 +58,7 @@ info:
title: '&a当前加载的 &e{0} &a个区块中 共有 &e{1} &a个商店 覆盖 &e{2} &a个世界.' title: '&a当前加载的 &e{0} &a个区块中 共有 &e{1} &a个商店 覆盖 &e{2} &a个世界.'
selling: '&b出售商店&a有 &e{0} &a个.' selling: '&b出售商店&a有 &e{0} &a个.'
buying: '&d收购商店&a有 &e{0} &a个.' buying: '&d收购商店&a有 &e{0} &a个.'
unlimited: '&c无限商店&a有 &e{0} &a个.'
double: '&3大箱子商店 &e{0} &a个.' double: '&3大箱子商店 &e{0} &a个.'
canclean: '&a可以用 &b/qs clean &a清理的商店有 &e{0} &a个.' canclean: '&a可以用 &b/qs clean &a清理的商店有 &e{0} &a个.'