Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a guild group permission #509

Open
Jeroen123TC opened this issue Sep 10, 2021 · 11 comments
Open

Add a guild group permission #509

Jeroen123TC opened this issue Sep 10, 2021 · 11 comments

Comments

@Jeroen123TC
Copy link

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 Jeroen123TC changed the title Add a guild group permissiob Add a guild group permission Sep 10, 2021
@wolfebersahd
Copy link

wolfebersahd commented Sep 10, 2021

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.

@Jeroen123TC
Copy link
Author

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

@wolfebersahd
Copy link

wolfebersahd commented Sep 10, 2021

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

@Jeroen123TC
Copy link
Author

Okey thanks for your help!

@Jeroen123TC
Copy link
Author

Jeroen123TC commented Sep 10, 2021

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)

@darbyjack
Copy link
Member

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.

@Jeroen123TC
Copy link
Author

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

@darbyjack
Copy link
Member

All of the guilds already have a UUID.

@Jeroen123TC
Copy link
Author

Jeroen123TC commented Sep 11, 2021

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

@darbyjack
Copy link
Member

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.

@Jeroen123TC
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants