Interface WhitelistModule

All Superinterfaces:
org.incendo.cloud.execution.CommandExecutionHandler<FPlayer>, ModuleCommand, ModuleLocalization, ModuleSimple

public interface WhitelistModule extends ModuleCommand
The /whitelist command, which controls who may join.
  • Method Details

    • localization

      Localization.Command.Whitelist localization(FPlayer fPlayer)
      Description copied from interface: ModuleLocalization
      The localization section for a player, picked from their chosen language.
      Specified by:
      localization in interface ModuleLocalization
      Parameters:
      fPlayer - the player the text is for
      Returns:
      the localization settings
    • config

      Description copied from interface: ModuleCommand
      The config section for this command, which also holds its aliases.
      Specified by:
      config in interface ModuleCommand
      Specified by:
      config in interface ModuleSimple
      Returns:
      the command settings
    • permission

      Description copied from interface: ModuleSimple
      The permission that gates this module.
      Specified by:
      permission in interface ModuleSimple
      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

      boolean isWhitelisted(FPlayer fPlayer)
      Whether a player is on the whitelist.
      Parameters:
      fPlayer - the player
      Returns:
      true if they may join
    • kickOnlinePlayers

      void kickOnlinePlayers(@NonNull Moderation moderation)
      Disconnects everyone who is no longer whitelisted.
      Parameters:
      moderation - the entry that caused the change
    • kickPlayer

      void kickPlayer(FEntity fModerator, FPlayer fTarget)
      Disconnects one player removed from the whitelist.
      Parameters:
      fModerator - the moderator
      fTarget - the player to remove