Content generated with AI — it may contain mistakes.

ExyliaHitEffect/GuidesUpdated in v1.6.1

Choose menu, weapon or both

Decide whether effects follow the player, live on weapons or both, and hand out tokens and removers.

Page 5 of 214 min read

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#

ModeWhere the effect comes fromWhat it implies
playerOnly what the player picked in /hiteffect.It follows the player and plays on whatever they hit with. Tokens do nothing.
weaponOnly what is bound to the weapon.It is traded, dropped and lost with the weapon. /hiteffect refuses to open and says it is disabled.
bothThe weapon's own effect, and the player's choice for a weapon carrying none.The default. The weapon wins.

Tokens#

RuleDetail
Weapons onlySwords, axes, tridents, maces, bows and crossbows. Anything else is ignored.
One at a timeA weapon already carrying an effect is refused: take the first off with a remover.
FittingAn effect declaring weapons is refused on a weapon it does not list, see Edit the effect catalogue.
No permissionHolding the token is the proof, so binding one asks for no permission node. It is bought, traded and lost like any item.
Consumedbehaviour.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.

A token is not the item it is drawn as

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
config.yml
yaml
behaviour:
  mode: both
  consume-token: true
  consume-remover: true
  hide-without-permission: false
lang/<code>/messages.yml
yaml
weapon-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