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 TypeMethodDescriptiondefault Set<@NonNull Class<? extends ModuleSimple>> children()The modules nested under this one.config()The config section this module reads its settings from.default BiPredicate<FEntity, Boolean> An extra condition that turns the module off for one entity, on top of the config and the permission.name()Identifies this module in the config, in permissions and on the proxy channel.default voidCalled once the module is switched off.default voidonEnable()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
-
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 whateveronEnable()set up. -
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
The modules nested under this one. They are switched on and off along with it.- Returns:
- the child module types, empty by default
-
permissions
Every permission this module registers, which is its own by default.- Returns:
- the permissions
-