Interface IntegrationModule
- All Superinterfaces:
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 Summary
Modifier and TypeMethodDescriptioncheckMention(FEntity fPlayer, String message) Lets the integrations rewrite mentions in a message, so a Discord ping renders as one.config()The config section this module reads its settings from.booleancontainsEnabledChild(ModuleName moduleName) Whether a named integration is hooked and switched on.deeplTranslate(FPlayer sender, String source, String target, String text) Translates text through DeepL, if that integration is enabled.Every permission group known to the server.intgetGroupWeight(FPlayer fPlayer) The weight of a player's highest group, used to decide who outranks whom.The external mute applying to a player.The prefix a permission plugin gives a player.intgetSortWeight(FPlayer fPlayer) The weight a player is sorted by in the tab list.The suffix a permission plugin gives a player.getTritonLocale(FPlayer fPlayer) The language Triton has selected for a player.booleanhasFPlayerPermission(FPlayer fPlayer, String permission) Whether a permission plugin grants this node, consulted when the platform cannot answer.booleanhasSeeVanishPermission(FEntity sender) Whether this entity may see hidden players.booleanWhether any vanish plugin is installed at all.booleanWhether the permission plugin answers yes to everything, which means its answers carry no information.booleanisBedrockPlayer(FEntity fPlayer) Whether the player joined through Geyser or Floodgate, which changes what their client can render.booleanWhether another moderation plugin has this player muted.booleanisVanished(FEntity sender) Whether a vanish plugin is hiding this entity.The permission that gates this module.booleansendMessageWithInteractiveChat(FEntity fReceiver, net.kyori.adventure.text.Component message) Hands a message to InteractiveChat so its own placeholders are expanded.yandexTranslate(FPlayer sender, String source, String target, String text) Translates text through Yandex, if that integration is enabled.Methods inherited from interface ModuleSimple
children, isDisable, name, onDisable, onEnable, permissions
-
Method Details
-
config
Integration config()Description copied from interface:ModuleSimpleThe config section this module reads its settings from.- Specified by:
configin interfaceModuleSimple- Returns:
- the settings
-
permission
Permission.Integration permission()Description copied from interface:ModuleSimpleThe permission that gates this module.- Specified by:
permissionin interfaceModuleSimple- Returns:
- the permission
-
checkMention
-
isVanished
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
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 readermessage- the message- Returns:
- true if InteractiveChat took it
-
isMuted
Whether another moderation plugin has this player muted.- Parameters:
fPlayer- the player- Returns:
- true if an external mute applies
-
isBedrockPlayer
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
The external mute applying to a player.- Parameters:
fPlayer- the player- Returns:
- the mute, or null if none applies
-
getTritonLocale
-
containsEnabledChild
Whether a named integration is hooked and switched on.- Parameters:
moduleName- the integration- Returns:
- true if it is usable
-
hasFPlayerPermission
-
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
-
getSuffix
-
getGroups
-
getGroupWeight
The weight of a player's highest group, used to decide who outranks whom.- Parameters:
fPlayer- the player- Returns:
- the weight
-
getSortWeight
The weight a player is sorted by in the tab list.- Parameters:
fPlayer- the player- Returns:
- the weight
-
deeplTranslate
Translates text through DeepL, if that integration is enabled.- Parameters:
sender- who askedsource- the language to translate fromtarget- the language to translate intotext- the text- Returns:
- the translation, or the original text if DeepL is unavailable
-
yandexTranslate
Translates text through Yandex, if that integration is enabled.- Parameters:
sender- who askedsource- the language to translate fromtarget- the language to translate intotext- the text- Returns:
- the translation, or the original text if Yandex is unavailable
-