Class Everyone

  • All Implemented Interfaces:
    Restriction<Object>

    @ApplicationScoped
    public class Everyone
    extends Object
    implements Restriction<Object>
    A restriction that allows a command for everyone. This always allows a command and is effectively the same as not having any restrictions. It is used internally if no other restrictions are applied and can be used to explicitly state that a command is allowed for everyone.
    • Constructor Detail

      • Everyone

        public Everyone()
    • Method Detail

      • allowCommand

        public boolean allowCommand​(CommandContext<?> commandContext)
        Description copied from interface: Restriction
        Returns whether a command caused by the given command context should be allowed by this restriction or not.
        Specified by:
        allowCommand in interface Restriction<Object>
        Parameters:
        commandContext - the command context, usually fully populated
        Returns:
        whether a command caused by the given command context should be allowed by this restriction or not