Signed Chat Message (Expression) — SkBee

Addon: SkBee · Category: Expression · Since: 3.5.0

Syntax

signed [chat] message

Description

Get the signed chat message from the async chat event. This can be used to delete message from clients.

Examples

#Simplified Example
on async chat:
	set {_msg} to signed chat message
	#...a little while later
	remove all players from {_msg}

#Extended Example With Chat Formatting
on async chat:
	#setup chat format
	set {_m::1} to text component from "&7[&cx&7]"
	set {_m::2} to text component from " &b%player% &7» "
	set {_m::3} to async chat message

	#setup option to delete message when clicking the "[x]"
	set {_msg} to signed chat message
	create callback for {_m::1}:
		if player has permission "admin.chat.deletemessage":
			remove all players from {_msg}

	#set chat format to our format
	set {_format} to merge components {_m::*}
	set async chat format to {_format}

View source