Guilds icon indicating copy to clipboard operation
Guilds copied to clipboard

Add a guild group permission

Open Jeroen123TC opened this issue 4 years ago • 11 comments

Is it possible to add a permission for every guild, so we can make it possible to give some functions to a single guild. This will help me realy out :)

Jeroen123TC avatar Sep 10 '21 13:09 Jeroen123TC

This can easily be accomplished by setting whatever permissions you want in the lowest tier of the tier.yml. That way every guild/guild member will have that permission.

wolfebersahd avatar Sep 10 '21 14:09 wolfebersahd

Jeah thats possible, but how do you remove that permission from the player for when he leaves the guild?

Jeroen123TC avatar Sep 10 '21 14:09 Jeroen123TC

When he's not in a guild, then he won't have the tier permission

that's the whole point in the tiers.yml is for permissions only while they're in a guild

wolfebersahd avatar Sep 10 '21 14:09 wolfebersahd

Okey thanks for your help!

Jeroen123TC avatar Sep 10 '21 14:09 Jeroen123TC

But is it hen possible to create a total new permission for the entire guild? So i can use that permission in another plugins.

like: guild.(guildname)

Jeroen123TC avatar Sep 10 '21 14:09 Jeroen123TC

I've had this suggested before and this would be really annoying to maintain simply because players could change the guild name and we would had to change the permissions of all players in that guild (online and offline). So, I'm open to hearing ideas on how to implement it but that's my 2 cents.

darbyjack avatar Sep 10 '21 21:09 darbyjack

If you give all the guilds a id than you don’t have trouble with the names.

Jeroen123TC avatar Sep 10 '21 21:09 Jeroen123TC

All of the guilds already have a UUID.

darbyjack avatar Sep 11 '21 19:09 darbyjack

UUID is a code or something? But not a permission right?

Jeroen123TC avatar Sep 11 '21 19:09 Jeroen123TC

Correct, a UUID is a unique identifier for each guild to ensure that they can all be easily identified in the code and by people. Here's an example:

{
  "id": "746affd0-6980-4589-a5ad-a79a1b00bbdf",
  "name": "PaperMc",
  "prefix": "PaperMc",
  "guildMaster": {
    "uuid": "222488f8-eb0b-451a-b574-10080db0e534",
    "role": {
      "level": 0
    },
    "joinDate": 1630448568076,
    "lastLogin": 0
  },
  "guildSkull": {
    "serialized": "e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNmJkYzg5MDc3MDAwOGQ2YjRmMzQxNzFkMjdmNmQ1OGE2OGM2NDAwMjI3OGNiYTM2Yzk4NWY0NWM0ZDJhNTIyOCJ9fX0\u003d"
  },
  "status": "Private",
  "tier": {
    "level": 1
  },
  "balance": 0.0,
  "members": [
    {
      "uuid": "222488f8-eb0b-451a-b574-10080db0e534",
      "role": {
        "level": 0
      },
      "joinDate": 1630448568076,
      "lastLogin": 1630882686375
    }
  ],
  "invitedMembers": [],
  "allies": [],
  "pendingAllies": [],
  "codes": [],
  "vaults": [],
  "lastDefended": 0,
  "creationDate": 1630448568076
}

That "id" key is the guild's UUID.

darbyjack avatar Sep 13 '21 15:09 darbyjack

Alright, and is it possible to add a real permission by every guild? Then i can connect that with worldguard and a shops plugin.

Jeroen123TC avatar Sep 13 '21 16:09 Jeroen123TC