Class VoiceRegionPenaltyProvider

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Integer getPenalty(LavalinkNode node, VoiceRegion region) Calculate the penalty for the provider.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VoiceRegionPenaltyProvider

        VoiceRegionPenaltyProvider()
    • Method Detail

      • getPenalty

         Integer getPenalty(LavalinkNode node, VoiceRegion region)

        Calculate the penalty for the provider.

        Return value should never exceed MAX_ERROR. Lower means to take preference.

        Parameters:
        node - The lavalink node to calculate the penalty for.
        region - The preferred voice region for the node, null if not specified.
        Returns:

        A number between 0 and MAX_ERROR (inclusive), using numbers outside of this range may cause errors.