mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-22 02:12:25 +00:00
Fixed NoSuchMethodError on 1.8
This commit is contained in:
parent
bbd0046ed1
commit
8533c017e7
@ -96,11 +96,16 @@ public class ShopInteractListener implements Listener {
|
||||
|
||||
Inventory chestInv = e.getInventory();
|
||||
|
||||
if (!(e.getInventory().getHolder() instanceof Chest || e.getInventory().getHolder() instanceof DoubleChest)) {
|
||||
if (!(chestInv.getHolder() instanceof Chest || chestInv.getHolder() instanceof DoubleChest)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Location loc = chestInv.getLocation();
|
||||
Location loc = null;
|
||||
if (chestInv.getHolder() instanceof Chest) {
|
||||
loc = ((Chest) chestInv.getHolder()).getLocation();
|
||||
} else if (chestInv.getHolder() instanceof DoubleChest) {
|
||||
loc = ((DoubleChest) chestInv.getHolder()).getLocation();
|
||||
}
|
||||
|
||||
final Shop shop = plugin.getShopUtils().getShop(loc);
|
||||
if (shop == null) return;
|
||||
|
Loading…
Reference in New Issue
Block a user