Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

FAQ: Is it possible to make custom Death messages?

Matt Peterson edited this page Aug 24, 2013 · 6 revisions

As of MD 1.0, the solution to this is simple, of which there are three parts. First, we use a TypeName alias to make the Types look nice:

Aliases:
    TypeNames:
        Slime_Huge:
            - 'Big Squishie'
        PLAYER: #Case doesn't matter, as always.
            - 'schmuck'
            - 'louse'
            - 'idiot'

TypeName aliases are used to override the value of "%{entity_type}" references in Message routines. If there is more than one value, then MD will randomly select from the pool of strings.

For the Death portion of our config, we can make a fairly nice death message system like so:

Death:
    - 'if target.type.player':
        - 'switch.attacker.type':
            - 'Player':
                - 'message.world': "&6%{target_name}&f was killed by that %{attacker_type} %{attacker_name}"
            - 'Living': # Catches anything else classified under the "living" element
                - 'message.world': "That %{target_type} %{target_name} was killed by a %{attacker_type}"
        - 'switch.damage.type': #These are not entities anymore Toto
            - 'Nature': # Catches anything else that could kill a player.
                - 'message.world': "%{target_name} was killed by %{attacker_type}"

If you try this config, you'll notice that vanilla death messages are still present, since MD does not interfere with them by default. There is an option to disable this that is included with auto-generated config:

disable-deathmessages: true # Set this to true to get rid of 'em.
Clone this wiki locally