Give player a rank/permissions if they have a set word in their Minecraft User

  • 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 comminuty!

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

Fuzy_ly4

Member
Jul 15, 2019
2
0
0
28
Category: Skript

Suggested name: UserRanks?

Spigot/Skript Version: I am using Paper Spigot #639 - Skript 2.3.6

What I want:
The Skript would give players a rank or permissions if they have a set word in their username, example:
You can set the word to be "VIP" in the config, if the player's username is "VIP_player", he will get the VIP rank, and if he changes his name back to "player", he will lose the rank. So if the player has the VIP word anywhere in his username, he gets the rank. Case Sensitivity could be toggled on or off if possible (Not really needed for me, but perhaps other people could use it!)

I guess a way to do it would be to check when the player joins, then search for the word in his username, and then execute some commands, if not, don't execute commands. that way, commands would also be totally configurable.

Ideas for commands: /ur,/userranks version? (I think the word should only be set in the skript config for security purposes)

Ideas for permissions: userranks.ver

When I'd like it by: I am not in a hurry really, but the sooner the better! Thank you very much!
 
Code:
options:
    word: Vip #The word that the name should contain
    rank: Vip #The rank that should be given

on join:
    if "%player%" contains "{@word}"
        execute console command "/manuadd %player% {@rank}"

Hope it is what you meant
 
I'm fairly certain it uses their Minecraft username, not for example the username from the /nick command. Also, this skript is kinda weird, i don't know why you'd use it.
 
Code:
options:
    word: Vip #The word that the name should contain
    rank: Vip #The rank that should be given

on join:
    if "%player%" contains "{@word}"
        execute console command "/manuadd %player% {@rank}"

Hope it is what you meant
Thank you very much, that's exactly what I wanted! :emoji_slight_smile: Sorry for the late response.. (bruh)

I don't get the point of this Skript, mind elaborating? Why not just apply the name tag etc... on command?
It was poorly explained, but basically - if someone joins with a certain word in their username they would get a rank, and it removes it if they don't.

I'm fairly certain it uses their Minecraft username, not for example the username from the /nick command. Also, this skript is kinda weird, i don't know why you'd use it.
./nick wouldn't be a problem.
 
Category: Skript

Suggested name: UserRanks?

Spigot/Skript Version: I am using Paper Spigot #639 - Skript 2.3.6

What I want:
The Skript would give players a rank or permissions if they have a set word in their username, example:
You can set the word to be "VIP" in the config, if the player's username is "VIP_player", he will get the VIP rank, and if he changes his name back to "player", he will lose the rank. So if the player has the VIP word anywhere in his username, he gets the rank. Case Sensitivity could be toggled on or off if possible (Not really needed for me, but perhaps other people could use it!)

I guess a way to do it would be to check when the player joins, then search for the word in his username, and then execute some commands, if not, don't execute commands. that way, commands would also be totally configurable.

Ideas for commands: /ur,/userranks version? (I think the word should only be set in the skript config for security purposes)

Ideas for permissions: userranks.ver

When I'd like it by: I am not in a hurry really, but the sooner the better! Thank you very much!


I'm trying to make a similar thing to where when people join they get a betatesters rank. Is this possible in skript or am I the stupid? I'm using luckperms btw for the rank
 
I'm trying to make a similar thing to where when people join they get a betatesters rank. Is this possible in skript or am I the stupid? I'm using luckperms btw for the rank

Yes, also why use an old thread? Just make a new one.

Note: You might want to change the group name if it doesn't match your group name

Code:
on join:
    #First Join
    if player hasn't played before:
        execute console command "lp user %player% group add betatester"