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

How to detect if user has a group? #446

Open
xfoscarz opened this issue Jul 27, 2020 · 1 comment
Open

How to detect if user has a group? #446

xfoscarz opened this issue Jul 27, 2020 · 1 comment

Comments

@xfoscarz
Copy link

If the user joining has a staff group, then don't broadcast their join. If they have a paid group, like VIP, or MVP, then broadcast their join. If they are default group, then don't broadcast their join. How would I do that? I'm reading the docs and there doesn't seem to be a way to read the groups that a user has.

@Day-OS
Copy link

Day-OS commented Jul 28, 2020

Some permissions plugins use permissions as a way to detect if a player is on a group or not, like: "groups.example". you could use ".hasPermission()" to detect it.

Edit1: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/permissions/Permissible.html#hasPermission(java.lang.String)

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

2 participants