RockinChaos / ItemJoin

Get custom items on join.
https://www.craftationgaming.com/
GNU Lesser General Public License v3.0
139 stars 36 forks source link

Placeholders in lores #546

Closed ArmanUppal closed 1 year ago

ArmanUppal commented 1 year ago

Server Version

PaperSpigot 1.20

Resource Version

ItemJoin v6.0.2

Dump Information

n/a

Describe The Problem

I heard that using this plugin you can out placeholders in lores. I wanted to make one for fortune on a pickaxe so everytime i get a higher fortune the placeholder also changes. How can I do this?

Additional Context

No response

Checklist

RockinChaos commented 1 year ago

Apologies for the late reply,

After a lot of looking around it looks like you would want the Player expansion from PlaceholderAPI and to use the placeholder %player_item_in_hand_level_LOOT_BONUS_BLOCKS%

The custom item would need to have the dynamic itemflag as well so it can update the lore's placeholder automagically.

An item may look like this;

  mining-item:
    id: DIAMOND_PICKAXE
    slot: 0
    lore:
      - '&aYou have a Level &c%player_item_in_hand_level_LOOT_BONUS_BLOCKS% &aPickaxe!'
    itemflags: dynamic

EDIT: Closing due to inactivity, I assume that I have answered the question. Feel free to reopen this issue if you still need additional help.