Interface ModuleLocalization

All Superinterfaces:
ModuleSimple
All Known Subinterfaces:
AfkModule, AfkModule, AnimationModule, AnonModule, AutoModule, BallModule, BanlistModule, BanModule, BossbarModule, BrandModule, BroadcastModule, CapsModule, ChatcolorModule, ChatModule, ChatsettingModule, ClearchatModule, ClearmailModule, CoinModule, ConditionModule, DeletemessageModule, DeleteModule, DiceModule, DiscordModule, DoModule, EmitModule, FadingModule, FlectonepulseModule, FloodModule, FormatModule, GeolocateModule, GreetingModule, HelperModule, IgnorelistModule, IgnoreModule, JoinModule, KickModule, MailModule, MaintenanceModule, MeModule, MentionModule, MinesweeperModule, ModuleCommand, ModuleListLocalization, MutelistModule, MuteModule, NamesModule, NewbieModule, NicknameModule, ObjectModule, OnlineModule, PaddingModule, PingModule, PollModule, QuestionAnswerModule, QuitModule, ReplacementModule, ReplyModule, RightclickModule, RockpaperscissorsModule, ScoreboardModule, SidebarModule, SpriteModule, SpyModule, StreamModule, SwearModule, SymbolModule, TelegramModule, TellModule, TictactoeModule, ToponlineModule, TranslateModule, TranslatetoModule, TryModule, TwitchModule, UnbanModule, UnmuteModule, UnwarnModule, UpdateModule, VanillaModule, WarnlistModule, WarnModule, WhitelistModule, WhoisModule

public interface ModuleLocalization extends ModuleSimple
A module that speaks to players and therefore has translatable text, and optionally a cooldown and a sound.
  • Method Details

    • localization

      LocalizationSetting localization(FPlayer fPlayer)
      The localization section for a player, picked from their chosen language.
      Parameters:
      fPlayer - the player the text is for
      Returns:
      the localization settings
    • permissions

      default Set<PermissionSetting> permissions()
      Description copied from interface: ModuleSimple
      Every permission this module registers, which is its own by default.
      Specified by:
      permissions in interface ModuleSimple
      Returns:
      the permissions
    • cooldown

      default Optional<Pair<Cooldown, PermissionSetting>> cooldown()
      The cooldown for this module together with the permission that bypasses it, if it has one.
      Returns:
      the cooldown and its bypass permission, or empty if the module has no cooldown
    • cooldownOrThrow

      default Pair<Cooldown, PermissionSetting> cooldownOrThrow()
      The cooldown, for callers that already know the module is configured with one.
      Returns:
      the cooldown and its bypass permission
      Throws:
      IllegalStateException - if the module has no cooldown configured
    • sound

      default Optional<Pair<Sound, PermissionSetting>> sound()
      The sound for this module together with the permission needed to hear it, if it has one.
      Returns:
      the sound and its permission, or empty if the module has no sound
    • soundOrThrow

      default Pair<Sound, PermissionSetting> soundOrThrow()
      The sound, for callers that already know the module is configured with one.
      Returns:
      the sound and its permission
      Throws:
      IllegalStateException - if the module has no sound configured