Hi i have a problem with my code when i try this code:
then when i click on any rank like Owner or admin it grabs the block instead of executing the command and also is there a easier way of making it not run when i click on the glass panes.
Code:
options:
p: &f[&aNew&2Name&f]
command rank [<offline player>] [<text>] [<text>]:
permission: lobby.staff
permission message: &cYou do not have those permissions.
trigger:
if arg-1 is set:
if arg-2 is set:
if arg-3 is not set:
open chest with 3 rows named "&fSelect the category!" to player
format slot 0 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 1 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 2 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 3 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 4 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 5 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 6 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 7 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 8 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 9 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 10 of player with wooden axe named "&f| &cStaff &f|" with lore "&fOnly for people who are staff and had been promoted or demoted" to close then run [make player execute command "rank %arg-1% %arg-2% staff"]
format slot 11 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 12 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 13 of player with hook named "&f| &9Playtime &f|" with lore "&fOnly for players with a certain amount of playtime" to close then run [make player execute command "rank %arg-1% %arg-2% playtime"]
format slot 14 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 15 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 16 of player with diamond named "&f| &6Buy &f|" with lore "&fOnly for donators or people who bought a rank" to close then run [make player execute command "rank %arg-1% %arg-2% donator"]
format slot 17 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 18 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 19 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 20 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 21 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 22 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 23 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 24 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 25 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 26 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 27 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
if arg-3 is "staff":
wait a tick
open chest with 3 rows named "&fSelect a rank!" to player
format slot 0 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 1 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 2 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 3 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 4 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 5 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 6 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 7 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 8 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 9 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 10 of player with red clay named "&f| &4Owner &f|" to close then run [make console execute command "pex user %arg-1% group set Owner"]->[send "{@p} You have changed the rank of &2%arg-1% &f to &f[&4Owner&f] with the reason &a%arg-2%!" to player]->[send "{@p} &2%player% &fhas changed your rank to &f[&4Owner&f] with the reason &a%arg-2%&f!" to arg-1]
format slot 11 of player with pink clay named "&f| &cAdmin &f|" to close then run [make console execute command "pex user %arg-1% group set Admin"] ->[send "{@p} You have changed the rank of &2%arg-1% &f to &f[&cAdmin&f] with the reason &a%arg-2%!" to player]->[send "{@p} &2%player% &fhas changed your rank to &f[&cAdmin&f] with the reason &a%arg-2%&f!" to arg-1]
format slot 12 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 13 of player with light blue clay named "&f| &9Mod &f|" to close then run [make console execute command "pex user %arg-1% group set Mod"]->[send "{@p} You have changed the rank of &2%arg-1% &f to &f[&9Mod&f] with the reason &a%arg-2%!" to player]->[send "{@p} &2%player% &fhas changed your rank to &f[&9Mod&f] with the reason &a%arg-2%&f!" to arg-1]
format slot 14 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 15 of player with green clay named "&f| &aHelper &f|" to close then run [make console execute command "pex user %arg-1% group set Helper"]->[send "{@p} You have changed the rank of &2%arg-1% &f to &f[&aHelper&f] with the reason &a%arg-2%!" to player]->[send "{@p} &2%player% &fhas changed your rank to &f[&aHelper&f] with the reason &a%arg-2%&f!" to arg-1]
format slot 16 of player with yellow clay named "&f| &eBuilder &f|" to close then run [make console execute command "pex user %arg-1% group set Builder"]->[send "{@p} You have changed the rank of &2%arg-1% &f to &f[&eBuilder&f] with the reason &a%arg-2%!" to player]->[send "{@p} &2%player% &fhas changed your rank to &f[&eBuilder&f] with the reason &a%arg-2%&f!" to arg-1]
format slot 17 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 18 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 19 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 20 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 21 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 22 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 23 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 24 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 25 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 26 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
format slot 27 of player with gray glass pane named "&f" to close then run [make player execute command "rank %arg-1% %arg-2%"]
else:
send "{@p} Add a reason!" to player
else:
send "{@p} Add a player!" to player