Skip to content

Default to max permissible radius when no radius is specified in command arguments #51

@MCAlagaesia

Description

@MCAlagaesia

The radius to clean currently defaults to Bukkit.getServer().getViewDistance(); when no radius is specified (e.g. by running the command /cleanlight with no arguments).

If a user has a limitation on their maximum clean radius (i.e. they have been given the lightcleaner.clean.radius.[radius] permission less than the server view distance), they get the following message when using /cleanlight with no arguments:
image

Given the user didn't specify a radius, this error message may be unclear. By defaulting to the user's maximum clean radius (if defined by permissions), the interaction with the plugin is simplified.

It may be useful to fall back to the server view distance as the maximum radius if:

  • A maximum clean radius is not defined in permissions for the user
  • The user's maximum clean radius as defined by permissions is greater than the server view distance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions