diff --git a/src/me/ryanhamshire/AutomaticInventory/AIEventHandler.java b/src/me/ryanhamshire/AutomaticInventory/AIEventHandler.java index a4f9703..d2e4a05 100644 --- a/src/me/ryanhamshire/AutomaticInventory/AIEventHandler.java +++ b/src/me/ryanhamshire/AutomaticInventory/AIEventHandler.java @@ -91,6 +91,13 @@ public void onProjectileLaunch(ProjectileLaunchEvent event) tryRefillStackInHand(player, EquipmentSlot.HAND, false); } + @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) + public void onFeedAnimal(PlayerInteractEntityEvent event) + { + Player player = event.getPlayer(); + tryRefillStackInHand(player, event.getHand(), true); + } + private void tryRefillStackInHand(Player player, EquipmentSlot slot, boolean dataValueMatters) { if(slot == null) return;