I've been trying for a couple of hours now trying to understand how this works.
Need a way to only show the "x" to admins and a way to change the message to "&c✖ This message was removed" if this is possible.
And also if somebody would explain to me how this works would be great, thanks.
Code:
on async chat:
set {_m::1} to text component from "%player's prefix% %player%%player's suffix% &7» "
set {_m::2} to "%async chat message% "
set {_m::3} to text component from "&7[&cx&7]"
add hover event showing "&cClick to remove this message" to {_m::3}
set {_msg} to signed chat message
create callback for {_m::3}:
if player has permission "admin.chat.deletemessage":
remove all players from {_msg}
#set text of {_msg} to text component from "&c✖ This message was removed"
set {_format} to merge components {_m::*}
set async chat format to {_format}
Need a way to only show the "x" to admins and a way to change the message to "&c✖ This message was removed" if this is possible.
And also if somebody would explain to me how this works would be great, thanks.