This repository has been archived by the owner on Apr 3, 2024. It is now read-only.
Routine: Message
Deide edited this page Oct 4, 2012
·
22 revisions
Sends a message to the specified players. This can include interpolated variables and color codes. It is recommended that you use double quotes where you are actually defining the message to be sent.
- 'message.{target}._messagealias'
or
- 'message.{target}': "Your &4message&f here! Hi %{target_name}!"
{target}
- This can be world
, server
, console
, or an {entity}
or {player}
reference from the current event. See Events.
Color codes can be inserted with &
and a hexadecimal value (0
thru 9
and a
thru f
). Font codes can also be inserted: random, bold, strikethrough, underline, or italic (k
thru o
). Various variables can be inserted into the message to tell players things about what is happening, by placing it inside %{...}
. See the bullets below and the Integer Variable References page for an exhaustive list of what you can use.
event_environment
event_world
-
{entity}_group
- prints a block-noted list of player groups. -
{entity}_regions
- prints a block-noted list of regions the entity is in. -
{entity}_tag
- prints a block-noted list of entity tags. -
{entity}_wielding
- Player or Enderman's item in hand. Otherwise returns "null". -
{player}_armorset
- prints block-noted list of player's equipped armor. {player}_name
Damage:
- 'if attacker.type.player and chance.30'
- '*2'
- 'message.target': "You took a critical hit!"
Spawn:
- 'message.target': "&3Welcome to life in &4%{target_world}&3, human child!"
Damage:
- 'if (attacker.type.player and attacker.haspermission.customperms.mobcrits) and target.type.mob and chance.10':
- '*2'
- 'message.attacker': "You have dealt a crit!"
Spawn:
- 'if target.type.player':
- 'message.target':
- '&6MOTD'
- '&0----------'
- "&3Protip: don't suck."
- "&3One man's trash is another man's treasure."