Placeholders
Placeholders are variables in strings in config. When you spawn an armor or weapon, all placeholders will be replaced with the correct value. For example, adding <item_generic_armor>
into the lore of your armor will display a number showing how many armor bars it has.
WeaponMechanicsPlus is optional for placeholders. However, formatting options (percentage
, bar
, emoji
) won't function without it. It also updates item display names and lore when players equip the weapon/armor, which is unavailable in the free plugin WeaponMechanics.
So if you can use placeholders without WeaponMechanicsPlus, why should we use WeaponMechanicsPlus?
Placeholders are updated automatically by WeaponMechanicsPlus. Without it, older guns will become outdated and use old values.
For ArmorMechanics, this occurs whenever you equip armor.
For WeaponMechanics, this occurs whenever you stop shooting, or equip the gun.
Formats. WeaponMechanicsPlus adds placeholders formats (You can modify them in the
your server -> plugins -> WeaponMechanics -> placeholders
folder).
Numeric Format
This is the most commonly used format, because most config values are numbers (Like damage, armor, reloading times, zoom amount, etc). Let's take a look at the item_generic_max_health.yml
placeholder.
Enum Format
List Format
All Items
These placeholders are available for all items.
Placeholder | Description |
---|---|
| The amount of armor added by the armor attribute |
| The amount of health added by the health attribute |
| The amount of speed added by the movement speed attribute |
ArmorMechanics
These placeholders are exclusively available for Armor items from ArmorMechanics.
Placeholder | Description |
---|---|
WeaponMechanics
These placeholders are exclusively available for Weapon items from WeaponMechanics
Last updated