@Override
public void onPlayerStoppedUsing(ItemStack stack, World world, EntityPlayer player, int itemUse) {
int draw = this.getMaxItemUseDuration(stack) - itemUse;
ArrowLooseEvent event = new ArrowLooseEvent(player, stack, draw);
MinecraftForge.EVENT_BUS.post(event);
if (event.isCanceled()) {
return;
}
draw = event.charge;
boolean flag = player.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0;