I am trying to change a player's luckperms rank and geting the rank name, player's rank, and the weight of the rank. sharpsk is not working for me, please help
here is my code
here is my code
Code:
command /grant <player> <text=default>:
permission: nativeranks.grant
permission message: &cYou do not have the required permissions to execute this command!
trigger:
set {_playerrank} to the luckperms primary group of player
set {_y} to the luckperms primary group of arg-1
set {_%arg-1%-weight} to the weight of the LuckPerms group named arg-2
set {_%player%-weight} to the weight of the LuckPerms group named {_playerrank}
if {_%arg-1%-weight} is higher than {_%player%-weight}:
send "&c&lAccess Denied: &bYou cannot grant this player that rank!" to player
if {_%arg-1%-weight} is the weight of the LuckPemrs group named arg-1:
send "&c&lAccess Denied: &bYou cannot grant this player that rank! - Player is higher!" to player
else:
send "&a&lSucess! &6Sucessfully Granted %arg-1% the rank %arg-2%"
set player's primary luckperms group to arg-2
send "&a&lYou have been granted the rank &6%arg-1%" to arg-1