From f89f58ba40990b2142af1b5791ca4fa2c3523b57 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Thu, 5 Nov 2015 11:07:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B4=A7=E6=80=A5=E6=9B=B4=E6=96=B0=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=87=91=E6=96=A7=E6=9D=83=E9=99=90=E9=97=AE?= =?UTF-8?q?=E9=A2=98...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- pom.xml | 4 ++-- .../org/maxgamer/QuickShop/Listeners/PlayerListener.java | 6 +++--- src/main/resources/plugin.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 3d09114..3943e1b 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.maxgamer QuickShop - 1.5.1 + 1.5.2 快捷商店重置版本... ${project.name} @@ -54,7 +54,7 @@ http://ci.citycraft.cn:8080 - 完善7老板的底层Gson库... + &4紧急更新 &c修复金斧权限检测问题... UTF-8 diff --git a/src/main/java/org/maxgamer/QuickShop/Listeners/PlayerListener.java b/src/main/java/org/maxgamer/QuickShop/Listeners/PlayerListener.java index 7fa2948..af995ae 100644 --- a/src/main/java/org/maxgamer/QuickShop/Listeners/PlayerListener.java +++ b/src/main/java/org/maxgamer/QuickShop/Listeners/PlayerListener.java @@ -165,19 +165,19 @@ public class PlayerListener implements Listener { final Location loc = shop.getLocation(); String shopmode = ""; if (e.getAction() == Action.RIGHT_CLICK_BLOCK) { - if (p.hasPermission("quickshop.unlimited")) { + if (p.hasPermission("quickshop.unlimited") && (shop.getOwner().equalsIgnoreCase(p.getName()) || p.isOp())) { shop.setUnlimited(!shop.isUnlimited()); shopmode = shop.isUnlimited() ? "§e无限模式" : "§c有限模式"; p.sendMessage(MsgUtil.p("command.toggle-unlimited", shopmode)); return; } } else { - if (shop.getShopType() == ShopType.BUYING && p.hasPermission("quickshop.create.sell")) { + if (shop.getShopType() == ShopType.BUYING && p.hasPermission("quickshop.create.sell") && (shop.getOwner().equalsIgnoreCase(p.getName()) || p.isOp())) { shop.setShopType(ShopType.SELLING); p.sendMessage(MsgUtil.p("command.now-selling", shop.getDataName())); shopmode = "出售模式"; return; - } else if (shop.getShopType() == ShopType.SELLING && p.hasPermission("quickshop.create.buy")) { + } else if (shop.getShopType() == ShopType.SELLING && p.hasPermission("quickshop.create.buy") && (shop.getOwner().equalsIgnoreCase(p.getName()) || p.isOp())) { shop.setShopType(ShopType.BUYING); p.sendMessage(MsgUtil.p("command.now-buying", shop.getDataName())); shopmode = "收购模式"; diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 7dcb923..01ddbf7 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,7 +1,7 @@ name: ${project.artifactId} description: ${project.description} main: ${project.groupId}.${project.artifactId}.${project.artifactId} -version: ${project.version} +version: ${project.version}-Build#${env.BUILD_NUMBER} authors: - Netherfoam - Timtower