Hello.
I have a server with the luckperms plugin and I want to create an array there with all the ranks, called {ranks}.
I wanted to create a command to rank people really fast, with /rank [<player>] [<text>] (the text arg is the rank).
My first attempt went well:
Now I want to create a system that can say whether or not the rank exists.
I need to create an array with all the ranks, and then to check if arg-2 is inside the array so I can send the player that the rank does not exist.
Any help would be appreciated so much.
I have a server with the luckperms plugin and I want to create an array there with all the ranks, called {ranks}.
I wanted to create a command to rank people really fast, with /rank [<player>] [<text>] (the text arg is the rank).
My first attempt went well:
Code:
command /rank [<player>] [<text>]:
aliases: /promote, /demote
permission: rank.admin
permission message: You aren't allowed to execute this command.
trigger:
if arg 1 is not set:
send "&cPlease choose a player to rank" to player
stop
if arg 2 is not set:
send "&cPlease choose a rank" to player
stop
execute command "/lp user %arg-1% parent set %arg-2%"
stop
I need to create an array with all the ranks, and then to check if arg-2 is inside the array so I can send the player that the rank does not exist.
Any help would be appreciated so much.
Last edited: