Interface WhitelistModule
- All Superinterfaces:
org.incendo.cloud.execution.CommandExecutionHandler<FPlayer>, ModuleCommand, ModuleLocalization, ModuleSimple
The /whitelist command, which controls who may join.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumWhat was done to the whitelist.Nested classes/interfaces inherited from interface org.incendo.cloud.execution.CommandExecutionHandler
org.incendo.cloud.execution.CommandExecutionHandler.FutureCommandExecutionHandler<C> -
Method Summary
Modifier and TypeMethodDescription@Nullable Moderationconfig()The config section for this command, which also holds its aliases.booleanWhether the whitelist is enforced.booleanisWhitelisted(FPlayer fPlayer) Whether a player is on the whitelist.voidkickOnlinePlayers(@NonNull Moderation moderation) Disconnects everyone who is no longer whitelisted.voidkickPlayer(FEntity fModerator, FPlayer fTarget) Disconnects one player removed from the whitelist.localization(FPlayer fPlayer) The localization section for a player, picked from their chosen language.The permission that gates this module.Methods inherited from interface org.incendo.cloud.execution.CommandExecutionHandler
executeFutureMethods inherited from interface ModuleCommand
execute, executeMethods inherited from interface ModuleLocalization
cooldown, cooldownOrThrow, permissions, sound, soundOrThrow
-
Method Details
-
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
-
config
Command.Whitelist config()Description copied from interface:ModuleCommandThe config section for this command, which also holds its aliases.- Specified by:
configin interfaceModuleCommand- Specified by:
configin interfaceModuleSimple- Returns:
- the command settings
-
permission
Permission.Command.Whitelist permission()Description copied from interface:ModuleSimpleThe permission that gates this module.- Specified by:
permissionin interfaceModuleSimple- Returns:
- the permission
-
add
@Nullable Moderation add(@NonNull FPlayer fModerator, @NonNull FPlayer fTarget, long time, @Nullable String reason) -
isTurnedOn
boolean isTurnedOn()Whether the whitelist is enforced.- Returns:
- true if only whitelisted players may join
-
isWhitelisted
Whether a player is on the whitelist.- Parameters:
fPlayer- the player- Returns:
- true if they may join
-
kickOnlinePlayers
Disconnects everyone who is no longer whitelisted.- Parameters:
moderation- the entry that caused the change
-
kickPlayer
-