The player's active item is not the item currently in their main hand. You want player.getInventory().getItemInMainHand(). Also, that will only return > 1.0 if the item is a tool of some sort, shovel, axe, hoe, sword, shears, or pickaxe as those are the only items that affect the breaking speed...