src/main/java/com/davidcubesvk/repairItem/utils/Repairer.java
/**
     * Repairs hand of the specified type.
     *
     * @param player the player to run the repair for
     * @return the repair result
     */
Repairs hand of the specified type.
@param player the player to run the repair for
@return the repair result
Repairs hand of the specified type . @param player the player to run the repair for @return the repair result
public RepairResult repairHand(Player player, boolean main) {
        if (main) {
            return repairItem(offHandSupported ? player.getInventory().getItemInMainHand() : player.getInventory().getItemInHand());
        } else {
            if (!offHandSupported)
                return new RepairResult(RepairResult.Status.FAIL_UNSUPPORTED);
            else
                return repairItem(player.getInventory().getItemInOffHand());
        }
    }
public RepairResult repairHand ( Player player , boolean main ) { if ( main ) { return repairItem ( offHandSupported ? player . getInventory ( ) . getItemInMainHand ( ) : player . getInventory ( ) . getItemInHand ( ) ) ; } else { if ( ! offHandSupported ) return new RepairResult ( RepairResult . Status . FAIL_UNSUPPORTED ) ; else return repairItem ( player . getInventory ( ) . getItemInOffHand ( ) ) ; } }
Repairs hand of the specified type.
Repairs hand of the specified type .
//If repairing main hand //If not supported