Do you think instead of the new variable just do flag = (par1ItemStack.itemID == Item.book.itemID) && enchantment.isAllowedOnBooks(); at line 16? I will take out the unnecessary new variable at that point.  