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

    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.

HonestlyPanda

Member
May 19, 2021
38
0
6
23
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:
on chat:
    {mutechat} is true:
        if player is not op: #here is where the custom permission would be
            cancel event
            send action bar "&cChat Is Muted!" to player
 
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:
on chat:
  if {mutechat} is true:
    if {perms::player::%player's uuid%::*} does not contain "chat.muteglobal.bypass":
      cancel event
      send action bar "&cChat Is Muted!" to player

command /giveperm <player> <text>:
  permission: op
  trigger:
    arg-1 is set
    arg-2 is set
    add "%arg-2%" to {perms::player::%arg-1's uuid%::*}
    

command /checkperms <player>:
  permission: op
  trigger:
    if {perms::player::%arg-1's uuid%::*} is not set:
      send "&c%arg-1% doesn't have permissions!"
    else:
      set {_perms} to "%{perms::player::%arg-1's uuid%::*}%"
      loop size of {perms::player::%arg-1's uuid%::*} - 1 times:
        add 1 to {_n}
        set {_l::*} to {_perms} split at ", "
        set {_permlist::%{_n}%} to "%{_l::*}%%nl%"
        if {_n} = size of {perms::player::%arg-1's uuid%::*} - 1:
          set {_ll::*} to {_permlist::%{_n}%} split at " and "
          set {_permlist::%{_n}%} to "%{_ll::1}%%nl%"
          set {_permlist::%{_n} + 1%} to "%{_ll::2}%"
          stop loop
      send {_permlist::*}
 
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:
on chat:
    {mutechat} is true:
        if player is not op: #here is where the custom permission would be
            cancel event
            send action bar "&cChat Is Muted!" to player
There is an addon for permission
 
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
 
Status
Not open for further replies.