Skip to content

Configuration Reference

coaster3000 edited this page Apr 7, 2013 · 75 revisions

Note: Due to the complex nature of ModDamage. The configuration references can be very large. We have split the references into separate pages to keep it maintainable.

TABLE OF CONTENTS:

Before You Read

While the tutorials certainly provide a good foundation for MD usage, it's not exhaustive, nor should it be. This page is meant to be a primary source of reference for explorative users or those who have questions about ModDamage features and/or how to use them.

For any MD config, you can verify that your YAML is valid here. This is helpful for people new to YAML, and a must for bug reporting.

Some of the syntax notation in individual routine entries may not necessarily be intuitive - it is necessary, then, to clarify what this notation means. An exhaustive list is as follows:

  • {armorsetalias} - a valid armor/equipment set interpreted by ModDamage, or an alias comprised of armorsets. See the second tutorial for more information.

  • {biomealias} - a valid Biome according to the Bukkit enum, or an alias comprised of these.

  • {comparison} - a comparison operator for the comparison conditional. Possible values can be found at the appropriate area in the ModDamage source.

  • {conditionalalias} - a Conditional string, which is of the form $condition [$operator $condition]...

  • {environment} - a valid Environment according to the Bukkit enum.

  • {groupalias} - a group defined in a Permissions implementation supported by ModDamage, or a group alias comprised of these. These are NOT validated by ModDamage upon load, so exercise caution with these values.

  • {itemalias} - Basically a Material with an amount associated. The format is $material*somenumber (no material aliases). It's worth noting that you can use dynamic numbers here.

  • {materialalias} - a valid Material according to the Bukkit enum.

  • {logical} - a logical operator for a conditional. Located in source here.

  • {messagealias} - a valid Message alias reference, a nested set of messages, or single message string. If using the latter, it's recommended to use double-quotes instead of single quotes around your Message routine to ensure that your message is read properly. Some examples:

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 entity.type.player':
        - 'message.entity':
            - '&9MOTD'
            - '&9----------'
            - "&2Protip:&9 don't suck."
            - "&9One man's trash is another man's treasure."
  • {typealias} - a string that corresponds to a type of entity in ModDamage. See the ModDamage Elements tree for more information.

  • {worldalias} - a world name in your Bukkit server, or an alias comprised of these. World names are validated upon loading, and will generate a warning that cannot be muted if you attempt to use a world name that does not exist.

The ModDamage Elements Tree

The ModDamageElement class no longer exists. Most of it became EntityType, but there is also DamageType and HealType.

SECTION A - "What Events Can I Change With ModDamage?"

Clone this wiki locally