Sword Settings

Global sword behaviour lives in sword.yml. Per-sword appearance and tiers are each their own file inside swords/.


sword.yml

settings:
  keep-on-death: true
  give-on-login: true
  sticky-item: true
  update-interval: 5
  afk-threshold: 30

sword-settings:
  default-sword: 'wooden-sword'
  menu-identifier: 'sword-enchant-inventory'
  sword-upgrade-symbol: ''

  sword-order:
    - 'wooden-sword'
    - 'stone-sword'

settings

Key
Type
Description

keep-on-death

[true/false]

If true the sword is kept when the player dies (does not drop).

give-on-login

[true/false]

If true the default-sword is given to a player the first time they join.

sticky-item

[true/false]

If true the sword always returns to the same inventory slot after it is used or swapped.

update-interval

integer

How often (in seconds) the sword item display (lore / name) is refreshed. Lower = more responsive, higher = less overhead.

afk-threshold

integer

Seconds of inactivity before a player is considered AFK. AFK players are skipped during the periodic update cycle.

sword-settings

Key
Type
Description

default-sword

string

The sword skin ID (filename without .yml) given to new players. Must exist in swords/.

menu-identifier

string

The menu ID opened when the player shift-right-clicks the sword. Must match a file in menus/.

sword-upgrade-symbol

string

The character used for tier progress symbols in lore (e.g. ). Supports Unicode.

sword-order

An ordered list of sword skin IDs from weakest to strongest.

  • The position in this list determines how the game knows whether one sword is "higher" or "lower" than another.

  • This is what drives placeholders like %phantomdungeons_sword_higher_{id}% and the upgrade-path validation (players must own the previous tier's max before purchasing the next sword).

  • Every sword file in swords/ that you want to be reachable must appear here.


Creating a New Sword

1

Create a file in swords/ named <id>.yml (e.g. diamond-sword.yml).

2

Add it to sword-order at the appropriate position.

3

Set default-sword if you want new players to start with it.

4

Reload the plugin — /dungeonsadmin reload.

Last updated