Hi!
My skript I'm trying to create is to give out a golden shovel. If the player has the permission "GP.shovel", they can type the command "/shovel" (which every rank has.)
If the player has the permission "GP.shovel.use", they can receive one golden shovel per five minutes. It will then send the player how much remaining time there is until the command can be used again.
If the player has the permission "GP.shovel.admin", they can receive one golden shovel every time they type /shovel - No five minute delay.
The problem is when I type /shovel with the permission GP.shovel.admin, it still sends me a message about how much time remaining I have, and gives me the shovel.
As the default rank, which only has the permission GP.shovel.use, it will does the exact same thing as the people with the permission GP.shovel.admin. I was wondering if someone could help me
I don't know if this makes any difference, but I use LuckPerms as my permissions plugin.
Here is the code:
Thank you!
My skript I'm trying to create is to give out a golden shovel. If the player has the permission "GP.shovel", they can type the command "/shovel" (which every rank has.)
If the player has the permission "GP.shovel.use", they can receive one golden shovel per five minutes. It will then send the player how much remaining time there is until the command can be used again.
If the player has the permission "GP.shovel.admin", they can receive one golden shovel every time they type /shovel - No five minute delay.
The problem is when I type /shovel with the permission GP.shovel.admin, it still sends me a message about how much time remaining I have, and gives me the shovel.
As the default rank, which only has the permission GP.shovel.use, it will does the exact same thing as the people with the permission GP.shovel.admin. I was wondering if someone could help me
I don't know if this makes any difference, but I use LuckPerms as my permissions plugin.
Here is the code:
Code:
command /shovel:
description: Gives you a shovel. Once per 5 minutes
permission: GP.shovel
executable by: players
trigger:
if player has the permission "GP.shovel.admin":
message "&6Recieving shovel!"
make console execute "give %player% golden_shovel 1"
if player has the permission "GP.shovel.use":
set {_waited} to difference between {shovel.%player%.lastused} and now
if {_waited} is less than 5 minutes:
message "&6You have recently executed this command. Wait &c%difference between 5 minutes and {_waited}% &6until you can execute this command."
stop
player doesn't have space for a cake:
message "You do not have enough space in your inventory to hold the shovel!"
stop
make console execute "give %player% golden_shovel 1"
set {shovel.%player%.lastused} to now
Thank you!