mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Fix bypass shop destory issue
Former-commit-id: 9e6314d4408045b4a4eefb097d7766f19b74ef81 [formerly 5f0fc418a822639fc3fec698228dfed0b2d59745] Former-commit-id: f4bd89cd16150d3a9ad8c3855451b772f5688d40
This commit is contained in:
1 parent
aad281ca8b
commit
9664a3ea71
1 file changed
+8
@@ -79,11 +79,19 @@ public class BlockListener implements Listener {
|
||||
p.sendMessage(MsgUtil.getMessage("no-creative-break", MsgUtil.getItemi18n(Material.GOLDEN_AXE.name())));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!shop.getModerator().isOwner(p.getUniqueId()) && !p.hasPermission("quickshop.other.destroy")) {
|
||||
e.setCancelled(true);
|
||||
p.sendMessage(MsgUtil.getMessage("no-permission"));
|
||||
return;
|
||||
}
|
||||
|
||||
// Cancel their current menu... Doesnt cancel other's menu's.
|
||||
Info action = plugin.getShopManager().getActions().get(p.getUniqueId());
|
||||
if (action != null) {
|
||||
action.setAction(ShopAction.CANCELLED);
|
||||
}
|
||||
|
||||
shop.onUnload();
|
||||
shop.delete();
|
||||
p.sendMessage(MsgUtil.getMessage("success-removed-shop"));
|
||||
|
||||
Reference in new issue
Block a user