From 16647cb4465002c2892d5a546a592227f052b39a Mon Sep 17 00:00:00 2001 From: Ghost_chu <2908803755@qq.com> Date: Wed, 13 May 2020 10:09:50 +0800 Subject: [PATCH 1/2] #463 Former-commit-id: dba5343790ac11e2b0b655268aaeb66da56128f3 --- .../org/maxgamer/quickshop/listener/BlockListener.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/maxgamer/quickshop/listener/BlockListener.java b/src/main/java/org/maxgamer/quickshop/listener/BlockListener.java index 96d45a222..6535ad0b8 100644 --- a/src/main/java/org/maxgamer/quickshop/listener/BlockListener.java +++ b/src/main/java/org/maxgamer/quickshop/listener/BlockListener.java @@ -54,7 +54,7 @@ public class BlockListener extends ProtectionListenerBase { /* * Removes chests when they're destroyed. */ - @EventHandler(priority = EventPriority.LOW) + @EventHandler(priority = EventPriority.NORMAL,ignoreCancelled = true) public void onBreak(BlockBreakEvent e) { final Block b = e.getBlock(); @@ -102,12 +102,7 @@ public class BlockListener extends ProtectionListenerBase { return; } - if (!shop.getModerator().isOwner(p.getUniqueId()) - && !QuickShop.getPermissionManager().hasPermission(p, "quickshop.other.destroy")) { - e.setCancelled(true); - MsgUtil.sendMessage(p, MsgUtil.getMessage("no-permission", p)); - return; - } + // Cancel their current menu... Doesnt cancel other's menu's. final Info action = super.getPlugin().getShopManager().getActions().get(p.getUniqueId()); From 769e902195e86a673bb8968033505aec899ec932 Mon Sep 17 00:00:00 2001 From: Ghost_chu <2908803755@qq.com> Date: Wed, 13 May 2020 10:56:44 +0800 Subject: [PATCH 2/2] Forcing header Former-commit-id: cc791741d4efe21ab8d4c8cf6ba7a5af57d36f38 --- src/main/java/org/maxgamer/quickshop/QuickShop.java | 2 +- src/main/resources/config.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java index 1477d8089..b85abe198 100644 --- a/src/main/java/org/maxgamer/quickshop/QuickShop.java +++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java @@ -587,7 +587,7 @@ public class QuickShop extends JavaPlugin { /* Process the config */ saveDefaultConfig(); reloadConfig(); - getConfig().options().copyDefaults(true); // Load defaults. + getConfig().options().copyDefaults(true).header("Read the example.config.yml file to get commented example config file."); // Load defaults. saveDefaultConfig(); reloadConfig(); // getConfig().options().copyDefaults(true); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 2579e9fd8..96f94d7f7 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -38,7 +38,7 @@ config-version: 106 #zh-CN #zh-TW -language: en +language: en-US #After you setup this, quickshop will download items/blocks/enchs and potions translation from MOJANGAPI #You can find supported language in your Minecraft Client Languages menu, fill this with the language Code.