Bind effects to bows
Choose whether effects follow the player or the bow, and sell tokens that players drop onto a bow.
By the end of this page you have chosen where effects come from on your server (the player, the bow or both), and you can hand a player a token that binds an effect to their bow and a remover that takes it off again.
Before you start#
Install the plugin, see Install ExyliaArrows. Tokens only work while behaviour.mode is bow or both. On a player server they do nothing.
Steps#
Choose the mode
In config.yml set behaviour.mode to player, bow or both (the default), then run /arrowsadmin reload. The three modes are explained below.
Give a token
Run /arrowsadmin item give <player> <effect> 1, for example /arrowsadmin item give Steve ember_trail 1. The player gets an item named after the effect (ARROW EFFECT » effect in English, ESTELA DE FLECHA » efecto in Spanish).
The player binds it
In their own inventory the player picks the token up with the cursor and clicks it onto a bow, crossbow or trident. The effect now travels with that bow.
Take it off again
Run /arrowsadmin item remover <player>. The player drops the remover onto the bound bow the same way. The effect comes off and comes back as a token in their inventory.
Without a token, you can bind the bow in your own hand: /arrowsadmin bow bind <effect> [player] binds the effect without asking whether the player owns it, and /arrowsadmin bow unbind [player] takes it off.
Check that it works#
Bind an effect to a bow, shoot with it and watch the trail. The bow shows a line with the effect's name under its own lore. Shoot with another bow: it plays nothing, or the player's menu choice if the mode is both.
The three modes#
| Mode | Where the effect comes from | What it means |
|---|---|---|
player | Only what the player picked in /arrows. | It follows the player and plays on whatever they shoot with. Tokens do nothing. |
bow | Only what is bound to the bow. | It is traded, dropped and lost with the bow. The menu refuses to open and says so. |
both | The bow's own effect, and the player's choice for a bow with none. | The default. A bound bow wins over the player's choice. |
Going further#
Effects by rank when nobody picked one#
behaviour.defaults in config.yml sets the effect a player plays while they have not picked one, by rank. The first line the player qualifies for wins, an empty permission means everyone (keep that line last), random plays a random effect they own and none gives that group nothing. Nothing is unlocked or saved. Ignored when the mode is bow.
behaviour:
defaults:
- permission: group.vip
cosmetic: random
- permission: ''
cosmetic: ember_trailWhat happens when a permission lapses#
A choice the player can no longer justify is taken off, not quietly skipped: it is dropped on the next shot, on the next menu open, on join and on /arrowsadmin player validate <player>. A starred effect is never dropped, so a shortlist survives. behaviour.hide-without-permission: true hides locked effects in the menu instead of showing them locked.
The line under a bound bow#
bow-lore.enabled in config.yml turns the line on and off. It travels on packets only and is never written to the item, so a shop, a crate or any plugin reading the bow finds exactly the lore it had, and renaming an effect updates every bow on the server at once. The wording is bow-lore in lang/<code>/messages.yml.
Rules for tokens and removers
config.yml:
behaviour:
mode: both
consume-token: true
consume-remover: true
hide-without-permission: false| Token rule | Detail |
|---|---|
| Which items | Bows, crossbows and tridents, in the player's own inventory. Anything else is ignored and the click carries on normally. |
| One at a time | A bow that already carries an effect is refused. Take the first one off with a remover. |
| Fitting | An effect declaring bows is refused on a bow it does not list. |
| No permission | Holding the token is the proof. It is bought, traded and lost like any item, so binding it asks for no permission. |
| Consumed | consume-token decides whether it is spent. Off, the token can be used again. |
| Remover rule | Detail |
|---|---|
| A free slot first | With a full inventory nothing happens: the bow is only changed once the token is known to fit. |
| Unknown effects | A bow carrying an id the file no longer declares is refused rather than turned into nothing. |
| Never lost | Should the token still not fit, it waits for the player's next join instead of being dropped. |
| Consumed | consume-remover decides whether the remover is spent. |
What is written onto the bow is one value, the effect id (exyliarrows:effect). Nothing else on the item changes. Tokens and removers are inert: drawn as an ender pearl one cannot be thrown, drawn as food it cannot be eaten. The materials are token-item and remover-item in config.yml.
Something missing on this page? Tell us on Discord