Choose menu, weapon or both
Decide whether effects follow the player, live on weapons or both, and hand out tokens and removers.
Choose where a hit effect comes from: what the player picked in /hiteffect, what is bound to the weapon they hit with, or both. Tokens put an effect on a weapon, removers take it off.
Before you start#
Tokens need behaviour.mode set to weapon or both. For the menu side, see Choose how players pick an effect.
Steps#
Pick the mode
In plugins/ExyliaHitEffect/config.yml set behaviour.mode to player, weapon or both (the default), then run /hiteffectsadmin reload.
Give a token
Run /hiteffectsadmin item give <player> <effect> [1-64], for example crit_spark.
Bind it to a weapon
The player picks the token up with the cursor and clicks it onto a sword, axe, trident, mace, bow or crossbow in their own inventory.
Take it off again
Run /hiteffectsadmin item remover <player> [1-64] and click the remover onto the weapon the same way. The effect comes off and returns to the player's inventory as a token.
Check that it works#
The weapon shows a line under its own lore with the effect's name, and hitting with it plays the effect. With a mode that reads weapons, a bound weapon plays its own effect even if the player picked another in the menu.
Going further#
The three modes#
| Mode | Where the effect comes from | What it implies |
|---|---|---|
player | Only what the player picked in /hiteffect. | It follows the player and plays on whatever they hit with. Tokens do nothing. |
weapon | Only what is bound to the weapon. | It is traded, dropped and lost with the weapon. /hiteffect refuses to open and says it is disabled. |
both | The weapon's own effect, and the player's choice for a weapon carrying none. | The default. The weapon wins. |
Tokens#
| Rule | Detail |
|---|---|
| Weapons only | Swords, axes, tridents, maces, bows and crossbows. Anything else is ignored. |
| One at a time | A weapon already carrying an effect is refused: take the first off with a remover. |
| Fitting | An effect declaring weapons is refused on a weapon it does not list, see Edit the effect catalogue. |
| No permission | Holding the token is the proof, so binding one asks for no permission node. It is bought, traded and lost like any item. |
| Consumed | behaviour.consume-token (default true) decides whether it is spent. Off, the token is reusable. |
To bind an effect yourself, with no token and ignoring ownership, hold the weapon and run /hiteffectsadmin weapon bind <effect> [player]. /hiteffectsadmin weapon unbind [player] strips it and gives nothing back.
Removers#
The effect comes off and returns as a token in the inventory of whoever removed it. With a full inventory the removal is refused, so a token is never lost. A weapon carrying an effect the catalogue no longer declares is refused rather than turned into nothing. behaviour.consume-remover (default true) decides whether the remover is spent.
The line under the weapon#
The line comes from weapon-lore in lang/<code>/messages.yml (%effect% is the effect's name; see Messages and languages) and is switched with weapon-lore.enabled in config.yml. It is drawn on packets only and never written to the item. A shop, a crate or any plugin reading that weapon finds the lore it had, renaming an effect updates every weapon at once, and switching it off hides the lines without touching an item.
What happens when a rank lapses#
By default players see effects they may not use locked. Set behaviour.hide-without-permission: true (default false) to hide them. A choice a player can no longer justify is taken off, not quietly skipped: on their next hit, when they open the menu, on join and with /hiteffectsadmin player validate [player]. Starred effects are never dropped.
Tokens and removers are inert: drawn as an ender pearl one cannot be thrown, drawn as food it cannot be eaten. Whatever it looks like, it can only be dropped onto a weapon.
Technical details
behaviour:
mode: both
consume-token: true
consume-remover: true
hide-without-permission: falseweapon-lore:
- "{secondary}Hit Effect:"
- " {letters_black}▎ {highlight}%effect%"What is written onto a weapon is one value, exyliahiteffect:effect, the effect id. Nothing else on the item changes. The item's material comes from the token and remover item settings in config.yml.
Something missing on this page? Tell us on Discord