-
Bug
-
Resolution: Invalid
-
Minor
-
None
-
None
-
git-Spigot-9a643a6-eb2e657
-
Yes
I am sorry I found the mistake. As stated in the thread I checked the source, not the destination. Sorry!
For a composter and a hopper underneath InventoryMoveItemEvent#getSource#getHolder is not an instance of Hopper
private Location getHoppersLocation(InventoryHolder holder) {
if (holder instanceof Hopper)
if (holder instanceof HopperMinecart)
{ HopperMinecart hopperMinecart = (HopperMinecart) holder; return hopperMinecart.getLocation().clone(); }new DebugMessage(this.getClass(), plugin, "HOLDER-CLASS = " + holder.getClass().getName());
return null;
}
This method returns null for InventoryMoveItemEvent#getSource#getHolder for me. Output of the debug-message: HOLDER-CLASS = org.bukkit.craftbukkit.v1_14_R1.inventory.CraftBlockInventoryHolder
This is (at least for me) crucial because otherwise I have no other way to get the location and I believe this is a bug.