Force normal player to run an admin command

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

BluecapMc

Member
Aug 5, 2021
4
0
1
Code:
every tick in "world":
    loop all players:
        set {_test} to loop-player's targeted silverfish
        if {_test}'s name is "face":
         
            make loop-player execute command "/execute as @s at @s if entity @e[type=minecraft:wither_skeleton,name=dontlook,distance=..5] run tag @s add dead"

So, I wanted to make a skript which can give players a tag calls "dead" when they are looking at a silverfish named "face" and a wither skeleton with the name "dontlook" is near them. It works perfectly on myself since i am an op but normal players are not allowed to trigger it as they dont have the permission. I have found some solutions about adding "as op" behind the command when you have Skutilities add-on. However, Minehut does not support that. Is there any other way to do so or maybe alternative add-on?
 
Code:
every tick in "world":
    loop all players:
        set {_test} to loop-player's targeted silverfish
        if {_test}'s name is "face":
        
            make loop-player execute command "/execute as @s at @s if entity @e[type=minecraft:wither_skeleton,name=dontlook,distance=..5] run tag @s add dead"

So, I wanted to make a skript which can give players a tag calls "dead" when they are looking at a silverfish named "face" and a wither skeleton with the name "dontlook" is near them. It works perfectly on myself since i am an op but normal players are not allowed to trigger it as they dont have the permission. I have found some solutions about adding "as op" behind the command when you have Skutilities add-on. However, Minehut does not support that. Is there any other way to do so or maybe alternative add-on?


The simplest and best solution in my opinion is to just use a console command, add the permission to the player, do the command, and remove the permission again.
 
The simplest and best solution in my opinion is to just use a console command, add the permission to the player, do the command, and remove the permission again.

Im not sure if I am doing this correctly or not. So I downloaded LuckPerms, and setup the permission. The default players will be given permission to use execute,selector, and tag when they are looking at the silverfish. Wouldn't it be very risky? Since they can use those command to do something as long as they are looking at the silverfish.
 
Status
Not open for further replies.