1. 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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Requests' started by Fuzy_ly4, Jul 15, 2019.

  1. Fuzy_ly4

    Fuzy_ly4 Member

    Joined:
    Jul 15, 2019
    Messages:
    2
    Likes Received:
    0
    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!
     
  2. Marsbar

    Marsbar Active Member

    Joined:
    Mar 31, 2019
    Messages:
    131
    Likes Received:
    4
    Code (Text):
    1. options:
    2.     word: Vip #The word that the name should contain
    3.     rank: Vip #The rank that should be given
    4.  
    5. on join:
    6.     if "%player%" contains "{@word}"
    7.         execute console command "/manuadd %player% {@rank}"
    Hope it is what you meant
     
  3. malia

    malia Well-Known Member

    Joined:
    Jul 24, 2019
    Messages:
    314
    Likes Received:
    21
    I don't get the point of this Skript, mind elaborating? Why not just apply the name tag etc... on command?
     
  4. inxane

    inxane Member

    Joined:
    Jul 23, 2019
    Messages:
    15
    Likes Received:
    0
    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.
     
  5. Fuzy_ly4

    Fuzy_ly4 Member

    Joined:
    Jul 15, 2019
    Messages:
    2
    Likes Received:
    0
    Thank you very much, that's exactly what I wanted! :emoji_slight_smile: Sorry for the late response.. (bruh)

    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.

    ./nick wouldn't be a problem.
     
    • Agree Agree x 1
  6. Lunar_Ghosty

    Lunar_Ghosty Member

    Joined:
    Dec 11, 2022
    Messages:
    2
    Likes Received:
    0

    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
     
  7. xdh

    xdh Active Member

    Joined:
    Apr 15, 2020
    Messages:
    75
    Likes Received:
    4
    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 (Text):
    1.  
    2.  
    3. on join:
    4.     #First Join
    5.     if player hasn't played before:
    6.         execute console command "lp user %player% group add betatester"
     

Share This Page

Loading...