mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
fix exception when hopperminecart transport items
Former-commit-id: bdd786f3eb58da7c25649a8571d5e518f879803f [formerly b583c861833bb306cf758b0c822fd7ed0c93825e] Former-commit-id: 01c851f74870146055f9921364b8804b60972110
This commit is contained in:
1 parent
e7f996f70c
commit
fd3652fc28
1 file changed
+1
-2
@@ -122,8 +122,7 @@ public class BlockListener implements Listener {
|
||||
public void onInventoryMove(InventoryMoveItemEvent event) {
|
||||
if (plugin.getConfig().getBoolean("protect.minecart")) {
|
||||
// Additional Hopper Minecart Check
|
||||
if (event.getDestination().getHolder() instanceof HopperMinecart || event.getInitiator()
|
||||
.getHolder() instanceof HopperMinecart) {
|
||||
if (event.getDestination().getHolder() instanceof HopperMinecart) {
|
||||
HopperMinecart hm = (HopperMinecart) event.getDestination().getHolder();
|
||||
Location minecartLoc = new Location(hm.getWorld(), hm.getLocation().getBlockX(), hm.getLocation()
|
||||
.getBlockY() + 1, hm.getLocation().getBlockZ());
|
||||
|
||||
Reference in new issue
Block a user