Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-5944

Allow for multiple permissions to be set for autocomplete

XMLWordPrintable

    • 1.16.1-R0.1-SNAPSHOT
    • Yes

      Currently you can register a command and have it autofill depending on if the user has a single permission which is a huge inconvenience. An example of this is:

      commands:
        heal:
          description: This will heal you.
          permission:
            first_plugin.commands.heal.self
      

      but the issue with this is that it should instead take in acceptable permission combination conditions an example on how this would be done would be like so:

      commands:
        heal:
          description: This will heal you.
          permissions:
            [first_plugin.commands.heal.self, first_plugin.commands.heal.others]
      

      In this example if the player has either one of those permissions it'll autocomplete with tab but we're still missing some needed functionality so let's so deeper:

      commands:
        heal:
          description: This will heal you.
          permissions:
            [
              [first_plugin.commands.heal.self, first_plugin.has_clean_record],
              [first_plugin.commands.heal.others, first_plugin.has_clean_record]
            ]

      In this example if either one of those permission combination conditions are met it'll autofill. The current way this is set up where only one permission can be put there for autocomplete doesn't cover what should be covered and something like this would be a major improvement.

            Unassigned Unassigned
            SmushyTaco Nikan Radan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: