mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Detect double chest shop #16
This commit is contained in:
1 parent
943d870708
commit
37fb3ec3a7
1 file changed
+9
-2
@@ -69,8 +69,15 @@ public class PlayerListener implements Listener {
|
||||
// Get the shop
|
||||
Shop shop = plugin.getShopManager().getShop(loc);
|
||||
// If that wasn't a shop, search nearby shops
|
||||
if (shop == null && b.getType() == Material.WALL_SIGN) {
|
||||
Block attached = Util.getAttached(b);
|
||||
if (shop == null) {
|
||||
Block attached = null;
|
||||
|
||||
if (b.getType() == Material.WALL_SIGN) {
|
||||
attached = Util.getAttached(b);
|
||||
} else if (b.getType() == Material.CHEST || b.getType() == Material.TRAPPED_CHEST) {
|
||||
attached = Util.getSecondHalf(b);
|
||||
}
|
||||
|
||||
if (attached != null) {
|
||||
shop = plugin.getShopManager().getShop(attached.getLocation());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user