Interface SwearModule
- All Superinterfaces:
ModuleLocalization, ModuleSimple
Censors messages that contain forbidden words.
-
Method Summary
Modifier and TypeMethodDescriptionaddTag(MessageContext messageContext) Registers the tag that renders a censored word.config()The config section this module reads its settings from.format(MessageContext messageContext) Censors the forbidden words and records a violation if the rule was broken.booleanisRestricted(UUID uuid) Whether this player has broken the rule often enough to be punished for it.localization(FPlayer fPlayer) The localization section for a player, picked from their chosen language.The permission that gates this module.Methods inherited from interface ModuleLocalization
cooldown, cooldownOrThrow, permissions, sound, soundOrThrow
-
Method Details
-
config
Message.Format.Moderation.Swear config()Description copied from interface:ModuleSimpleThe config section this module reads its settings from.- Specified by:
configin interfaceModuleSimple- Returns:
- the settings
-
permission
Permission.Message.Format.Moderation.Swear permission()Description copied from interface:ModuleSimpleThe permission that gates this module.- Specified by:
permissionin interfaceModuleSimple- Returns:
- the permission
-
localization
Description copied from interface:ModuleLocalizationThe localization section for a player, picked from their chosen language.- Specified by:
localizationin interfaceModuleLocalization- Parameters:
fPlayer- the player the text is for- Returns:
- the localization settings
-
format
Censors the forbidden words and records a violation if the rule was broken.- Parameters:
messageContext- the message being formatted- Returns:
- the formatted context
-
addTag
Registers the tag that renders a censored word.- Parameters:
messageContext- the message being formatted- Returns:
- the context with the tag added
-
isRestricted
Whether this player has broken the rule often enough to be punished for it.- Parameters:
uuid- the player- Returns:
- true if the violation limit has been reached
-