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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

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

custom permissions...?

Discussion in 'Skript' started by HonestlyPanda, Apr 30, 2022.

Thread Status:
Not open for further replies.
  1. HonestlyPanda

    HonestlyPanda Member

    Joined:
    May 19, 2021
    Messages:
    38
    Likes Received:
    0
    I made a mute chat skript but i want my admins to be able to chat without giving them op.... how would i do this??? heres my code:
    Code (Text):
    1. on chat:
    2.     {mutechat} is true:
    3.         if player is not op: #here is where the custom permission would be
    4.             cancel event
    5.             send action bar "&cChat Is Muted!" to player
     
  2. JakeTheChad

    Supporter

    Joined:
    Jan 30, 2022
    Messages:
    75
    Likes Received:
    5
    a cool way to make permissions with skript would be to make a variable list and adding the permission to it
    this won't however work with minecraft op, you'd need to add "op" to the list too.

    i do think there is a way better way to make this but i dont really deal with permissions with skript


    Code (Text):
    1. on chat:
    2.   if {mutechat} is true:
    3.     if {perms::player::%player's uuid%::*} does not contain "chat.muteglobal.bypass":
    4.       cancel event
    5.       send action bar "&cChat Is Muted!" to player
    6.  
    7. command /giveperm <player> <text>:
    8.   permission: op
    9.   trigger:
    10.     arg-1 is set
    11.     arg-2 is set
    12.     add "%arg-2%" to {perms::player::%arg-1's uuid%::*}
    13.    
    14.  
    15. command /checkperms <player>:
    16.   permission: op
    17.   trigger:
    18.     if {perms::player::%arg-1's uuid%::*} is not set:
    19.       send "&c%arg-1% doesn't have permissions!"
    20.     else:
    21.       set {_perms} to "%{perms::player::%arg-1's uuid%::*}%"
    22.       loop size of {perms::player::%arg-1's uuid%::*} - 1 times:
    23.         add 1 to {_n}
    24.         set {_l::*} to {_perms} split at ", "
    25.         set {_permlist::%{_n}%} to "%{_l::*}%%nl%"
    26.         if {_n} = size of {perms::player::%arg-1's uuid%::*} - 1:
    27.           set {_ll::*} to {_permlist::%{_n}%} split at " and "
    28.           set {_permlist::%{_n}%} to "%{_ll::1}%%nl%"
    29.           set {_permlist::%{_n} + 1%} to "%{_ll::2}%"
    30.           stop loop
    31.       send {_permlist::*}
     
  3. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    Hell nah, install a permission's system. This is a nightmare
     
  4. Mich

    Mich Active Member

    Joined:
    Jul 15, 2020
    Messages:
    145
    Likes Received:
    5
    There is an addon for permission
     
  5. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    What about just using the normal skript way to check if a player has permission and using a normal java made permission system?
     
  6. Mich

    Mich Active Member

    Joined:
    Jul 15, 2020
    Messages:
    145
    Likes Received:
    5
    YUOTE="Minecoll_YT, post: 61845, member: 7188"]What about just using the normal skript way to check if a player has permission and using a normal java made permission system?[/QUOTE]but he don't have a permission system like permissionsex
     
  7. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    Then he should install one, and NOT PermissionsEX
     
  8. Mich

    Mich Active Member

    Joined:
    Jul 15, 2020
    Messages:
    145
    Likes Received:
    5
  9. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
  10. HonestlyPanda

    HonestlyPanda Member

    Joined:
    May 19, 2021
    Messages:
    38
    Likes Received:
    0
    does this require a plugin? is there a way to make it with just skript?
     
  11. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    Skript only permission's system are unsupported.
     
  12. JakeTheChad

    Supporter

    Joined:
    Jan 30, 2022
    Messages:
    75
    Likes Received:
    5
    skperm is outdated and wont work, get luckperms and call it a day.
     
  13. HonestlyPanda

    HonestlyPanda Member

    Joined:
    May 19, 2021
    Messages:
    38
    Likes Received:
    0
Thread Status:
Not open for further replies.

Share This Page

Loading...