Do permissions have weight? What happens when they overlap?Solved

With the way I have my permission groups setup, players may have limiteddronerange.unlimited and limiteddronerange.short or limiteddronerange.unlimited and limiteddronerange.medium

How does the plugin handle that?

If it defaults to the lesser, is there a way to make it default to the greater?

Is it a matter of reorganizing the permission tiers in the config file from greatest to least? (I'll try that now)

Reorganizing the permission tiers didn't seem to matter. I was hoping it used the first one matched or something.

The documentation states that conflicts will prefer the ones towards the end of the list in the config. This is stated in the permissions section, just before the permissions themselves. This is why the default config places lower values first.

This is the default approach I use for plugin configs. In some cases, I will use Min or Max logic. Max logic is a food fit for this plugin so I may release an update for that.

However, it sounds like something isn't quite right in your case. Can you paste your config?

Here's what I have. In my case, I have unlimited permission assigned yet it's defaulting at 250m

{
  "DefaultMaxRange": 250,
  "ProfilesRequiringPermission": [
    {
      "PermissionSuffix": "shortrange",
      "MaxRange": 250
    },
    {
      "PermissionSuffix": "mediumrange",
      "MaxRange": 500
    },
    {
      "PermissionSuffix": "longrange",
      "MaxRange": 1000
    },
    {
      "PermissionSuffix": "unlimitedrange",
      "MaxRange": 0
    }
  ],
  "UISettings": {
    "AnchorMin": "0.5 0",
    "AnchorMax": "0.5 0",
    "OffsetMin": "0 75",
    "OffsetMax": "0 75",
    "TextSize": 24,
    "DefaultColor": "0.75 0.75 0.75 1",
    "OutOfRangeColor": "1 0.2 0.2 1",
    "DynamicColors": [
      {
        "DistanceRemaining": 100,
        "Color": "1 0.5 0 1"
      },
      {
        "DistanceRemaining": 50,
        "Color": "1 0.2 0.2 1"
      }
    ],
    "SecondsBetweenUpdates": 0.5
  }
}​


Merged post

Thanks for your help and speed.

I think the major issue was that somehow the permission names in the docs were different than in the config for me. For instance, limiteddronerange.unlimited vs. limiteddronerange.unlimitedrange. 

I think fixing that plus assigning the default permissions did the trick.

Thanks again, great plugin and assistance!
Locked automatically