DUXPLIMA Documentation

The bow and the arrow

The two items the plugin hands out, when they are handed out, how they look, and the lock that keeps them in place.

The plugin hands out two items and recognises them by a hidden tag, never by their name:

ItemShips asWhy it exists
The bowA glowing, unbreakable BOW in slot 1 (hotbar slot 2), named and described in the player's languageIt is the toy
The arrowOne ARROW in slot 9, the top left of the inventoryA bow cannot be drawn outside creative mode without an arrow. The shot never spends it

Slots count from 0: 0 to 8 is the hotbar, 9 to 35 the inventory, 36 to 39 the armour, 40 the off hand.

When it is handed out

Key under item.giveDefaultGives the bow when
on-jointrueA player joins
on-respawntrueA player respawns
on-world-changetrueA player changes world
respect-world-filtertrueEach of the three above is skipped in a world the world filter closes

A lobby gives it on join and leaves the other two on, so a player who loses it in some other way gets it back. An arena that only wants it in one world gives it on world change. /uxmteleportbow give hands it out by hand and ignores the world filter.

A player who changes into a closed world keeps the bow they hold; it is not taken away, and every shot there is refused with refused-world.

Where it goes

The bow goes to item.bow.slot when that slot is empty or holds the bow already; otherwise to the slot the player moved it to, or the first free slot. Another item is never written over, and a player never gets a second bow. Two plugins that each hand out an item need a slot each, or one of the items lands somewhere else.

How it looks

Key under item.bowDefaultWhat it does
material"BOW"The item. It must still be a bow for the game to fire an arrow; change it only for a resource pack that re-models one. A name the server does not know reads as BOW
lore-lines9How many lore lines are shown; line N is item.bow-lore-N in the messages
custom-model-data0The resource pack model; 0 for none
glowtrueThe enchanted shimmer, with no enchantment behind it
unbreakabletrueThe bow never wears out

The bow shows no vanilla tooltip lines (damage, enchantments): its lore says what it is. The name ships as a single space, so the first lore line carries the title. The name and lore are written in the messages files and drawn for each player in their own language, so two players holding the same bow read different words. See Messages.

The shipped lore, in English:

 ◆ Teleport Bow
    Lobby

 ✎ Description
    Shoot, and go where the arrow lands.
    The arrow is never spent.

 → Shoot to travel

The arrow

Key under item.ammoDefaultWhat it does
enabledtrueHand out the arrow. Turn it off only on a server where every player is in creative mode
material"ARROW"The item. A name the server does not know reads as ARROW
slot9The slot, by the same rule as the bow
amount1How many, from 1 to 64

item.bow.infinite-arrows = true (the default) keeps the shot from spending it. Turned off, the first shot spends the arrow and the bow cannot be drawn again until the player gets another.

The lock

item.locked = true keeps the bow and the arrow where they were put. They cannot be:

Taken byResult
A click, a shift click or a number key in any inventoryRefused
A dragRefused
The drop keyRefused
The swap hand keyRefused
PlacingRefused
DeathThey are left out of the drops

With item.locked = false a player can drop the bow, store it or give it away, and whoever picks it up holds a bow that works: the tag is on the item, not on the player.

Notes

  • An ordinary bow is not the teleport bow. A crafted or looted bow carries no tag, so it shoots arrows as usual.
  • A bow from before a rename still works. Changing bow-name or the lore never breaks a bow already handed out.

Related: Shooting, config.conf