I want to replace text in every send command and execute new version.
ex: /op @1 -> /op Nick
OK all works
ex: /op @1 -> /op Nick
Code:
on command:
if {komenda.%event-commandsender%} is true:
delete {komenda.%event-commandsender%}
stop
if {komenda.%event-commandsender%} is not set:
cancel event
set {_c} to the full command
set {komenda.%event-commandsender%} to true
if {_c} contains "@":
if event-commandsender is online:
replace all "@1" with "%player%" in {_c}
execute event-commandsender command {_c}
else:
execute event-commandsender command {_c}
else:
execute event-commandsender command {_c}
Last edited: