Fixed BentoBox listener error

This commit is contained in:
DaniFoldi 2021-01-26 21:20:45 +01:00
parent 79e2ca0b72
commit c0a0aa885e
2 changed files with 7 additions and 3 deletions

View File

@ -45,8 +45,12 @@ public class BentoBoxListener extends FlagListener {
}
private boolean handleForLocation(Player player, Location loc, Cancellable e) {
boolean allowed = checkIsland((Event) e, player, loc, BentoBoxShopFlag.SHOP_FLAG);
if (!allowed) {
boolean chest_allowed = checkIsland((Event) e, player, loc, BentoBoxShopFlag.SHOP_CHEST_FLAG);
boolean barrel_allowed = checkIsland((Event) e, player, loc, BentoBoxShopFlag.SHOP_BARREL_FLAG);
boolean shulker_allowed = checkIsland((Event) e, player, loc, BentoBoxShopFlag.SHOP_SHULKER_BOX_FLAG);
boolean trapped_chest_allowed = checkIsland((Event) e, player, loc, BentoBoxShopFlag.SHOP_TRAPPED_CHEST_FLAG);
if (!chest_allowed || !barrel_allowed || !shulker_allowed || !trapped_chest_allowed) {
e.setCancelled(true);
plugin.debug("Cancel Reason: BentoBox");
return true;

View File

@ -6,7 +6,7 @@ version: ${project.version}
author: EpicEric
website: ${project.url}
description: Create your own nice-looking chest shops and sell your stuff to other players!
softdepend: [WorldGuard, Towny, AuthMe, PlotSquared, uSkyBlock, ASkyBlock, IslandWorld, GriefPrevention, AreaShop, Multiverse-Core, MultiWorld, BentoBox]
softdepend: [WorldGuard, Towny, AuthMe, PlotSquared, uSkyBlock, ASkyBlock, IslandWorld, GriefPrevention, AreaShop, Multiverse-Core, MultiWorld, BentoBox, EconomyPlugin]
depend: [Vault]
api-version: 1.13