Interface FormatModule
- All Superinterfaces:
ModuleLocalization, ModuleSimple
Groups the formatting steps applied to a message, and decides which MiniMessage tags the sender may use.
-
Method Summary
Modifier and TypeMethodDescriptionaddTags(MessageContext messageContext) Registers the tags every formatting module contributes.config()The config section this module reads its settings from.booleanisCorrectTag(AdventureTag adventureTag, FEntity sender, boolean needPermission) Whether a sender may use a MiniMessage tag.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 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 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
-
addTags
Registers the tags every formatting module contributes.- Parameters:
messageContext- the message being formatted- Returns:
- the context with the tags added
-
isCorrectTag
Whether a sender may use a MiniMessage tag.- Parameters:
adventureTag- the tagsender- who wrote the messageneedPermission- whether the sender's permission is checked, or only the config- Returns:
- true if the tag is allowed
-