Player Permissions

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Jacksonnn

Member
Feb 7, 2017
10
2
0
This Skript checks the permissions of online players. I don't have any problems but I'm wondering how I can go about checking permissions for offline players, not just online players. Any help?
________________________________________________________________________________________

Skript Version: 2.2-dev26f
Skript Author: Latest Author (I don't know the name, sorry)
Minecraft Version: 1.11.2
---
Full Code:

code_language.skript:
command /checkperm [<text>]:
    trigger:
        if player has permission "staff.checkperm":
            loop all players:
                if loop-player has permission "%arg-1%":
                    add loop-player to  {_players::*}
                    message "&8[&7&lDarkcrest&8]&a Player %{_players::*}% has permission %arg-1%."
                    clear {_players::*}
        else:
            message "&8[&7&lDarkcrest Staff&8]&4 Error!&c It seems you do not have sufficent permissions to execute this command."

Errors on Reload: None

Console Errors: (if applicable) N/A

Other Useful Info: This command is meant to check permissions of certain players.

Addons using (including versions):
SKRambled <-> Latest Version
SharpSK <-> Latest Version
SkQuery-Lime <-> Latest Version
Skellett <-> Latest Version
TuSKe <-> Two Versions Behind
skUtitilies <-> 0.9.0

Troubleshooting:

Have you tried searching the docs? No
Have you tried searching the forums? No
What other methods have you tried to fix it? No problems.
 
Maybe set a variable to a player parsed as an offline player.
 
Maybe set a variable to a player parsed as an offline player.
Do you by chance have an example?
[doublepost=1496096762,1496026013][/doublepost]Anyone?
[doublepost=1496506342][/doublepost]So it's been almost a week and I still need help...
 
Do you by chance have an example?
[doublepost=1496096762,1496026013][/doublepost]Anyone?
[doublepost=1496506342][/doublepost]So it's been almost a week and I still need help...
set a variable parsed as all offline players
loop the variable
if loop-variable has a permission
Do stuff

This is a rough draft so I doubt it will work.
 
A offline player doesn't have permission, it is only setted when the player joins by a permission manager. What you have to do is: get a group of offline player, getting it from a yml file or search if some addon has expression to get the groups of offline player and the permissions of a group.
 
Status
Not open for further replies.