Resolved Mob Pickup ClassCastException (Critical Hotfix): Resolved a major console error / crash vector that occurred when non-player entities picked up items:
The Bug: Mobs (such as Piglins in the Nether, Allays, Foxes, or any other entities) picking up items triggered EntityPickupItemEvent, causing a silent failure or console spam with java.lang.ClassCastException: CraftPiglin cannot be cast to Player on ItemListener.onPickup(ItemListener.java:117).
The Fix: Added strict type checks to ensure player-only features (such as the aspiration animation, custom container limits, and RMB checks) are only applied when a real player interacts with the item.
Graceful Mob Cleanup: For non-player entities picking up items, the plugin now safely removes the active glow effects (removeGlow) with zero main thread overhead or casting errors.
Code Quality & Event Stability Polish:
Consistent Event Handling: Hardened the listener infrastructure to handle modern Paper 1.21.11 events securely.
Optimized Logic Flow: Simplified the item collection state machine inside ItemListener to isolate player logic from mob interactions perfectly.