Skip to content
Erich Gubler edited this page Dec 24, 2011 · 22 revisions

Syntax: message.($entity|world|server).$messagealias

Description: Sends a message with the specified filters. It is recommended that you use double quotes where you are actually defining the message to be sent - see example.

There are two major features that most configgers will find tasteful for Message routines (included in the examples at the bottom):

  • Dynamic insertion of string/number properties. These are encapsulated with % marks. See the bullets below and the Dynamic Number References page for an exhaustive list of what you can use.

    • event.environment

    • event.rangedelement

    • event.world

    • $entity.group - prints a block-noted list of player groups.

    • $entity.region - prints a block-noted list of regions the entity is in.

    • $entity.tag - prints a block-noted list of entity tags.

    • $entity.wield - Player or Enderman's item in hand. Otherwise returns "null".

    • $player.armorset - prints block-noted list of player's equipped armor.

    • $player.name

  • Color support! Use "&[code]" to set a color, which is a valid hexadecimal digit (0-9, a-f), case-insensitive.

Examples:

Damage:
     - 'if attacker.type.player and binom.30'
         - 'mult.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':
        - 'mult.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."

See also: Group

Clone this wiki locally