Interface ModuleSimple

All Known Subinterfaces:
AfkModule, AfkModule, AnimationModule, AnonModule, AnvilModule, AutoModule, BallModule, BanlistModule, BanModule, BookModule, BossbarModule, BrandModule, BroadcastModule, BubbleModule, CapsModule, ChatcolorModule, ChatModule, ChatsettingModule, ClearchatModule, ClearmailModule, CoinModule, CommandModule, ConditionModule, DeeplModule, DeletemessageModule, DeleteModule, DiceModule, DiscordModule, DoModule, EmitModule, FadingModule, FColorModule, FixationModule, FlectonepulseModule, FloodModule, FormatModule, GeolocateModule, GreetingModule, HelperModule, ICUModule, IgnorelistModule, IgnoreModule, IntegrationModule, JoinModule, KickModule, LuckPermsModule, MailModule, MaintenanceModule, MeModule, MentionModule, MessageModule, MinesweeperModule, ModerationModule, Module, ModuleCommand, ModuleListLocalization, ModuleLocalization, MutelistModule, MuteModule, NamesModule, NewbieModule, NicknameModule, ObjectiveModule, ObjectModule, OnlineModule, PaddingModule, PingModule, PollModule, QuestionAnswerModule, QuitModule, ReplacementModule, ReplyModule, RightclickModule, RockpaperscissorsModule, ScoreboardModule, SidebarModule, SignModule, SpriteModule, SpyModule, StatusModule, StreamModule, SwearModule, SymbolModule, TabModule, TelegramModule, TellModule, TictactoeModule, ToponlineModule, TranslateModule, TranslatetoModule, TryModule, TwitchModule, UnbanModule, UnmuteModule, UnwarnModule, UpdateModule, VanillaModule, WarnlistModule, WarnModule, WhitelistModule, WhoisModule, WorldModule, YandexModule

public interface ModuleSimple
The smallest form of a module, a named feature that can be switched on and off and that owns a permission. Modules form a tree, and disabling one disables everything under it.
  • Method Summary

    Modifier and Type
    Method
    Description
    default Set<@NonNull Class<? extends ModuleSimple>>
    The modules nested under this one.
    The config section this module reads its settings from.
    An extra condition that turns the module off for one entity, on top of the config and the permission.
    Identifies this module in the config, in permissions and on the proxy channel.
    default void
    Called once the module is switched off.
    default void
    Called once the module is switched on.
    The permission that gates this module.
    default Set<@NonNull PermissionSetting>
    Every permission this module registers, which is its own by default.
  • Method Details

    • name

      ModuleName name()
      Identifies this module in the config, in permissions and on the proxy channel.
      Returns:
      the module name
    • config

      EnableSetting config()
      The config section this module reads its settings from.
      Returns:
      the settings
    • permission

      PermissionSetting permission()
      The permission that gates this module.
      Returns:
      the permission
    • onEnable

      default void onEnable()
      Called once the module is switched on. Register listeners and start tasks here.
    • onDisable

      default void onDisable()
      Called once the module is switched off. Undo whatever onEnable() set up.
    • isDisable

      default BiPredicate<FEntity,Boolean> isDisable()
      An extra condition that turns the module off for one entity, on top of the config and the permission. It is used for things like per-world or per-player toggles.
      Returns:
      the condition; the boolean argument tells it whether the permission was already checked
    • children

      default Set<@NonNull Class<? extends ModuleSimple>> children()
      The modules nested under this one. They are switched on and off along with it.
      Returns:
      the child module types, empty by default
    • permissions

      default Set<@NonNull PermissionSetting> permissions()
      Every permission this module registers, which is its own by default.
      Returns:
      the permissions