Interface IntegrationModule

All Superinterfaces:
ModuleSimple

public interface IntegrationModule extends ModuleSimple
The single point every other module asks about third-party plugins, so nothing else has to know which of them are installed. Each question is answered by whichever hook is available, or by a harmless default when none is.
  • Method Details

    • config

      Integration config()
      Description copied from interface: ModuleSimple
      The config section this module reads its settings from.
      Specified by:
      config in interface ModuleSimple
      Returns:
      the settings
    • permission

      Description copied from interface: ModuleSimple
      The permission that gates this module.
      Specified by:
      permission in interface ModuleSimple
      Returns:
      the permission
    • checkMention

      String checkMention(FEntity fPlayer, String message)
      Lets the integrations rewrite mentions in a message, so a Discord ping renders as one.
      Parameters:
      fPlayer - who wrote it
      message - the text
      Returns:
      the rewritten text
    • isVanished

      boolean isVanished(FEntity sender)
      Whether a vanish plugin is hiding this entity.
      Parameters:
      sender - the entity
      Returns:
      true if it is hidden
    • hasVanishIntegration

      boolean hasVanishIntegration()
      Whether any vanish plugin is installed at all.
      Returns:
      true if one is hooked
    • hasSeeVanishPermission

      boolean hasSeeVanishPermission(FEntity sender)
      Whether this entity may see hidden players.
      Parameters:
      sender - the entity
      Returns:
      true if it can see through vanish
    • sendMessageWithInteractiveChat

      boolean sendMessageWithInteractiveChat(FEntity fReceiver, net.kyori.adventure.text.Component message)
      Hands a message to InteractiveChat so its own placeholders are expanded.
      Parameters:
      fReceiver - the reader
      message - the message
      Returns:
      true if InteractiveChat took it
    • isMuted

      boolean isMuted(FPlayer fPlayer)
      Whether another moderation plugin has this player muted.
      Parameters:
      fPlayer - the player
      Returns:
      true if an external mute applies
    • isBedrockPlayer

      boolean isBedrockPlayer(FEntity fPlayer)
      Whether the player joined through Geyser or Floodgate, which changes what their client can render.
      Parameters:
      fPlayer - the player
      Returns:
      true if they are on Bedrock
    • getMute

      ExternalModeration getMute(FPlayer fPlayer)
      The external mute applying to a player.
      Parameters:
      fPlayer - the player
      Returns:
      the mute, or null if none applies
    • getTritonLocale

      String getTritonLocale(FPlayer fPlayer)
      The language Triton has selected for a player.
      Parameters:
      fPlayer - the player
      Returns:
      the locale, or an empty string if Triton is not installed
    • containsEnabledChild

      boolean containsEnabledChild(ModuleName moduleName)
      Whether a named integration is hooked and switched on.
      Parameters:
      moduleName - the integration
      Returns:
      true if it is usable
    • hasFPlayerPermission

      boolean hasFPlayerPermission(FPlayer fPlayer, String permission)
      Whether a permission plugin grants this node, consulted when the platform cannot answer.
      Parameters:
      fPlayer - the player
      permission - the node
      Returns:
      true if it is granted
    • isAlwaysHaveTruePermission

      boolean isAlwaysHaveTruePermission()
      Whether the permission plugin answers yes to everything, which means its answers carry no information.
      Returns:
      true if every node is granted
    • getPrefix

      String getPrefix(FPlayer fPlayer)
      The prefix a permission plugin gives a player.
      Parameters:
      fPlayer - the player
      Returns:
      the prefix, or an empty string if none is set
    • getSuffix

      String getSuffix(FPlayer fPlayer)
      The suffix a permission plugin gives a player.
      Parameters:
      fPlayer - the player
      Returns:
      the suffix, or an empty string if none is set
    • getGroups

      Set<String> getGroups()
      Every permission group known to the server.
      Returns:
      the group names
    • getGroupWeight

      int getGroupWeight(FPlayer fPlayer)
      The weight of a player's highest group, used to decide who outranks whom.
      Parameters:
      fPlayer - the player
      Returns:
      the weight
    • getSortWeight

      int getSortWeight(FPlayer fPlayer)
      The weight a player is sorted by in the tab list.
      Parameters:
      fPlayer - the player
      Returns:
      the weight
    • deeplTranslate

      String deeplTranslate(FPlayer sender, String source, String target, String text)
      Translates text through DeepL, if that integration is enabled.
      Parameters:
      sender - who asked
      source - the language to translate from
      target - the language to translate into
      text - the text
      Returns:
      the translation, or the original text if DeepL is unavailable
    • yandexTranslate

      String yandexTranslate(FPlayer sender, String source, String target, String text)
      Translates text through Yandex, if that integration is enabled.
      Parameters:
      sender - who asked
      source - the language to translate from
      target - the language to translate into
      text - the text
      Returns:
      the translation, or the original text if Yandex is unavailable