mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2025-01-05 22:57:49 +01:00
Fix issues with double chests not begin detected as shops in some cases
This commit is contained in:
parent
b718fcc429
commit
58cf96dca8
@ -102,7 +102,13 @@ public class ChestShopSign {
|
||||
}
|
||||
|
||||
public static boolean isShopBlock(InventoryHolder holder) {
|
||||
return holder instanceof BlockState && isShopBlock(((BlockState) holder).getBlock());
|
||||
if (holder instanceof DoubleChest) {
|
||||
return isShopBlock(((DoubleChest) holder).getLeftSide())
|
||||
|| isShopBlock(((DoubleChest) holder).getRightSide());
|
||||
} else if (holder instanceof BlockState) {
|
||||
return isShopBlock(((BlockState) holder).getBlock());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean canAccess(Player player, Sign sign) {
|
||||
|
Loading…
Reference in New Issue
Block a user