Class Command

    • Constructor Detail

      • Command

        public Command​(String name)
        Construct a new command with no permissions or aliases.
        name - the name of this command
      • Command

        public Command​(String name,
                       String permission,
                       String... aliases)
        Construct a new command.
        name - primary name of this command
        permission - the permission node required to execute this command, null or empty string allows it to be executed by everyone
        aliases - aliases which map back to this command
    • Method Detail

      • execute

        public abstract void execute​(CommandSender sender,
                                     String[] args)
        Execute this command with the specified sender and arguments.
        sender - the executor of this command
        args - arguments used to invoke this command
      • hasPermission

        public boolean hasPermission​(CommandSender sender)
        Check if this command can be executed by the given sender.
        sender - the sender to check
        whether the sender can execute this
      • getName

        public String getName()
      • getPermission

        public String getPermission()
      • getAliases

        public String[] getAliases()
      • getPermissionMessage

        public String getPermissionMessage()
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        hashCode in class Object
      • setPermissionMessage

        protected void setPermissionMessage​(String permissionMessage)