Buggy code:
@ SuppressWarnings ( "deprecation" ) public class ShipHandler { ProfessionAPI prof ; FileConfiguration data ; static FileConfiguration config ; Plugin plugin ; HashMap < String , SchematicManager > schemManagers = new HashMap < String , SchematicManager > ( ) ; public ShipHandler ( ProfessionAPI prof , FileConfiguration data , FileConfiguration config , Plugin plugin ) { } public static void updateConfig ( FileConfiguration config ) { } public void createShip ( String shipName , Player player , String destinationName ) throws DataException , IOException , IllegalArgumentException , NullPointerException { } public void deleteShip ( CommandSender sender , String shipName ) throws IOException , IllegalArgumentException { } public void testDestination ( Player player , String shipName , String destinationName ) throws MaxChangedBlocksException , DataException , IOException , IllegalArgumentException , NullPointerException { } public void adjustDestination ( Player player , String direction , String shipName ) throws IncompleteRegionException , MaxChangedBlocksException , DataException , RegionOperationException , IOException { } public void cancelDestination ( String name ) { } public void addDestination ( Player player , String shipName , String destinationName ) { } public void removeDestination ( String shipName , String destinationName ) throws IllegalArgumentException { } public void listShips ( CommandSender sender ) { } public void moveShip ( Player player , String destination ) throws MaxChangedBlocksException , DataException , IOException , IllegalArgumentException { } public void diagnose ( Player player ) throws IllegalArgumentException { } public void repair ( Player player ) { UUID uuid = player . getUniqueId ( ) ; String professionReq = ShipHandler . config . getString ( "professionReqs.repair.profession" ) ; boolean professionEnabled = ShipHandler . config . getBoolean ( "professionsEnabled" ) ; if ( ( ( ( prof ) != null ) && professionEnabled ) && ( professionReq != null ) ) { int tierReq = ShipHandler . config . getInt ( "professionReqs.repair.tier" ) ; if ( ! ( prof . hasTier ( uuid , professionReq , tierReq ) ) ) throw new IllegalArgumentException ( ( ( ( ( ( ( "You<seq2seq4repair_space>cannot<seq2seq4repair_space>repair<seq2seq4repair_space>a<seq2seq4repair_space>ship<seq2seq4repair_space>because<seq2seq4repair_space>you<seq2seq4repair_space>are<seq2seq4repair_space>not<seq2seq4repair_space>" + ( getDeterminer ( prof . getTierName ( tierReq ) ) ) ) + "<seq2seq4repair_space>" ) + ( prof . getTierName ( tierReq ) ) ) + "<seq2seq4repair_space>" ) + professionReq ) + "." ) ) ; } Ship ship = findCurrentShip ( player ) ; if ( ship == null ) throw new IllegalArgumentException ( "You<seq2seq4repair_space>are<seq2seq4repair_space>not<seq2seq4repair_space>inside<seq2seq4repair_space>a<seq2seq4repair_space>ship." ) ; if ( ! ( ship . isBroken ( ) ) ) throw new IllegalArgumentException ( "The<seq2seq4repair_space>ship<seq2seq4repair_space>is<seq2seq4repair_space>already<seq2seq4repair_space>fully<seq2seq4repair_space>functional." ) ; String repairItem = ship . getRepairItem ( ) ; Material repairItemMaterial = Material . matchMaterial ( repairItem ) ; int dataValue ; if ( ship . getConsumePart ( ) ) dataValue = ShipHandler . config . getInt ( ( ( "events.breakdown.spareParts." + repairItem ) + ".data<seq2seq4repair_space>value" ) ) ; else dataValue = ShipHandler . config . getInt ( ( ( "events.breakdown.tools." + repairItem ) + ".data<seq2seq4repair_space>value" ) ) ; if ( ( ! ( player . getInventory ( ) . getItemInHand ( ) . getType ( ) . equals ( repairItemMaterial ) ) ) || ( ! ( ( player . getInventory ( ) . getItemInHand ( ) . getDurability ( ) ) == dataValue ) ) ) throw new IllegalArgumentException ( "You<seq2seq4repair_space>don't<seq2seq4repair_space>have<seq2seq4repair_space>the<seq2seq4repair_space>correct<seq2seq4repair_space>item." ) ; if ( ( ( prof ) != null ) && professionEnabled ) { int tier = prof . getTier ( uuid , professionReq ) ; <START_BUG> double successRate = ( ShipHandler . config . getInt ( ( "professionReqs.repair.successRate." + tier ) ) ) // 100 ; <END_BUG> double randomNum = Math . random ( ) ; if ( randomNum > successRate ) { int numItemsInHand = player . getItemInHand ( ) . getAmount ( ) ; if ( numItemsInHand <= 1 ) player . setItemInHand ( null ) ; else player . getItemInHand ( ) . setAmount ( ( ( player . getItemInHand ( ) . getAmount ( ) ) - 1 ) ) ; String itemName ; if ( ship . getConsumePart ( ) ) itemName = ShipHandler . config . getString ( ( ( "events.breakdown.spareParts." + repairItem ) + ".name" ) ) ; else itemName = ShipHandler . config . getString ( ( ( "events.breakdown.tools." + repairItem ) + ".name" ) ) ; player . sendMessage ( ( ( ( ( ChatColor . YELLOW ) + "You<seq2seq4repair_space>try<seq2seq4repair_space>to<seq2seq4repair_space>repair<seq2seq4repair_space>the<seq2seq4repair_space>ship,<seq2seq4repair_space>but<seq2seq4repair_space>you<seq2seq4repair_space>fumble<seq2seq4repair_space>and<seq2seq4repair_space>destroy<seq2seq4repair_space>your<seq2seq4repair_space>" ) + itemName ) + "!" ) ) ; return ; } } if ( ship . getConsumePart ( ) ) { int numItemsInHand = player . getItemInHand ( ) . getAmount ( ) ; if ( numItemsInHand <= 1 ) player . setItemInHand ( null ) ; else player . getItemInHand ( ) . setAmount ( ( ( player . getItemInHand ( ) . getAmount ( ) ) - 1 ) ) ; } ship . setBroken ( false ) ; player . sendMessage ( ( ( ChatColor . YELLOW ) + "You<seq2seq4repair_space>repaired<seq2seq4repair_space>the<seq2seq4repair_space>ship." ) ) ; } public void refuel ( Player player ) throws IllegalArgumentException { } public void shipInfo ( CommandSender sender , String shipName ) throws IllegalArgumentException { } public void setOwner ( CommandSender sender , String shipName , String owner ) throws IllegalArgumentException { } public void transfer ( Player owner , String shipName , String newOwner ) { } public void addPilot ( CommandSender sender , String shipName , String pilot ) throws IllegalArgumentException { } public void removePilot ( CommandSender sender , String shipName , String pilot ) throws IllegalArgumentException { } private Ship findCurrentShip ( Player player ) { } private void teleportPlayers ( Ship ship , Location newLocation ) { } private void teleportEntities ( Ship ship , Location newLocation ) { } private Set < Player > getPlayersInsideRegion ( Ship ship ) { } private Set < Entity > getEntitiesInsideRegion ( Ship ship ) { } private String getDeterminer ( String string ) { } public UUID getUUID ( String name ) { } public String getName ( UUID uuid ) { } }

Fix:
double successRate = ( ShipHandler . config . getDouble ( ( "professionReqs.repair.successRate." + tier ) ) ) // 100 ;