public boolean hasEnough ( double amount , String worldName , String currencyName ) { boolean result = false ; amount = format ( amount ) ; if ( ! Common . getInstance ( ) . getWorldGroupManager ( ) . worldGroupExist ( worldName ) ) { worldName = Common . getInstance ( ) . getWorldGroupManager ( ) . getWorldGroupName ( worldName ) ; } Currency currency = Common . getInstance ( ) . getCurrencyManager ( ) . getCurrency ( currencyName ) ; if ( currency != null && ( getBalance ( worldName , currencyName ) >= amount || hasInfiniteMoney ( ) ) ) { result = true ; } return result ; }
Checks if we have enough money in a certain balance