ScriptCraft

ScriptCraft

14.6k Downloads

How to detect if user has a group?

xfoscarz opened this issue ยท 1 comments

commented

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.

commented

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)