I have the bosshop plugin that lets me put a command in as a purchase reward so i wanted to use this script, but after the first if statement the command doesnt give the next set of permissions just keeps on doing the first one.
command /addplot2:
executable by: player
usage: Usage
description: &eExtra plot!
permission: addplot.plotadd
permission message: &cYou do not have permission.
trigger:
if player has permission "plots.plot.1":
add "plots.plot.2" to permission of player
remove "plots.plot.1" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.2":
add "plots.plot.3" to permission of player
remove "plots.plot.2" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.3":
add "plots.plot.4" to permission of player
remove "plots.plot.3" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.4":
add "plots.plot.5" to permission of player
remove "plots.plot.4" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.5":
add "plots.plot.6" to permission of player
remove "plots.plot.5" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.6":
add "plots.plot.7" to permission of player
remove "plots.plot.6" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.7":
add "plots.plot.8" to permission of player
remove "plots.plot.7" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.8":
add "plots.plot.9" to permission of player
remove "plots.plot.8" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.9":
add "plots.plot.10" to permission of player
remove "plots.plot.9" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.10":
send "&eYou have the max amount of plots!" to player
stop
[doublepost=1661354079,1661353755][/doublepost]cant edit with the code format so here
command /addplot2:
executable by: player
usage: Usage
description: &eExtra plot!
permission: addplot.plotadd
permission message: &cYou do not have permission.
trigger:
if player has permission "plots.plot.1":
add "plots.plot.2" to permission of player
remove "plots.plot.1" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.2":
add "plots.plot.3" to permission of player
remove "plots.plot.2" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.3":
add "plots.plot.4" to permission of player
remove "plots.plot.3" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.4":
add "plots.plot.5" to permission of player
remove "plots.plot.4" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.5":
add "plots.plot.6" to permission of player
remove "plots.plot.5" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.6":
add "plots.plot.7" to permission of player
remove "plots.plot.6" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.7":
add "plots.plot.8" to permission of player
remove "plots.plot.7" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.8":
add "plots.plot.9" to permission of player
remove "plots.plot.8" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.9":
add "plots.plot.10" to permission of player
remove "plots.plot.9" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.10":
send "&eYou have the max amount of plots!" to player
stop
[doublepost=1661354079,1661353755][/doublepost]cant edit with the code format so here
Code:
command /addplot2:
executable by: player
usage: Usage
description: &eExtra plot!
permission: addplot.plotadd
permission message: &cYou do not have permission.
trigger:
if player has permission "plots.plot.1":
add "plots.plot.2" to permission of player
remove "plots.plot.1" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.2":
add "plots.plot.3" to permission of player
remove "plots.plot.2" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.3":
add "plots.plot.4" to permission of player
remove "plots.plot.3" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.4":
add "plots.plot.5" to permission of player
remove "plots.plot.4" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.5":
add "plots.plot.6" to permission of player
remove "plots.plot.5" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.6":
add "plots.plot.7" to permission of player
remove "plots.plot.6" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.7":
add "plots.plot.8" to permission of player
remove "plots.plot.7" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.8":
add "plots.plot.9" to permission of player
remove "plots.plot.8" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.9":
add "plots.plot.10" to permission of player
remove "plots.plot.9" from permission of player
send "&eYou have gained an additional plot!" to player
stop
else if player has permission "plots.plot.10":
send "&eYou have the max amount of plots!" to player
stop