I'm making a /ignore command but I can't get it to work (all players receive the message). Any help would be appreciated
code_language.skript:
command /ignore [<player>]:
trigger:
if arg 1 is not set:
send "You are ignoring: %{ignorar:%player%::*}%"
stop
if arg 1 is set:
if arg 1 is "%player%":
send "You cannot ignore yourself."
stop
else:
if {ignorar:%player%::*} contains arg 1:
clear {ignorar:%player%::*}
send "You are no longer ignoring %arg 1%."
stop
else:
add arg 1 to {ignorar:%player%::*}
send "You are now ignoring %arg 1%."
stop
on chat:
cancel event
loop all players:
if {ignorar::%loop-player%::*} contains player:
stop
else:
send "%message%" to loop-player