ItemJoin

ItemJoin

157k Downloads

Specify Item-State Slots

RockinChaos opened this issue ยท 0 comments

commented

Describe The Feature

Forwarded from TheRobLP;
I just had an idea regarding the slots: feature in ItemJoin. What do you think about adding a feature that allows you to define other ItemJoin items as slots. This could be useful in case you have permission-based special skins on your server, and people are allowed to move their item around in the inventory. Example:

items:
  SolarWatch:
    id: CLOCK
    slot: 8
    name: &cSolar Watch
    permission-node: itemjoin.solar
    triggers: JOIN
  LunarWatch:
    id: CLOCK
    slot: <$SolarWatch>
    name: &6Lunar Watch
    permission-node: itemjoin.lunar
    triggers: INVENTORY-*

By the way, INVENTORY-* is another thing I just thought of. The * stands for various options, like JOIN, WORLD-SWITCH etc. It triggers ONLY if ItemJoin finds the item defined in slot: (In that case SolarWatch) in the players inventory.

Theo;
Maybe better have a Switch-item function
That's what I was thinking, swap-item already exists
But I see, it does not work for an item in the inventory or without clicking on it
Maybe have a give-event: with action

Rob;
Okay, so I thought about it and I believe what I meant is a system to allow server admins to have toggleable item states. So if for example a permission changes (and/or a custom command is being ran) by which the user should have the item swapped with another, he can do that. Now, I know swap-item exists, but that only works if the clicked item is the trigger. With this system, you would be able to replace any item in any slot upon performing a trigger or receiving such an item.

Expected Solution

items:
  SolarWatch:
    id: CLOCK
    slot: 8
    name: &cSolar Watch
    permission-node: itemjoin.solar
    triggers: JOIN
  LunarWatch:
    id: CLOCK
    slot: <$SolarWatch>
    name: &6Lunar Watch
    permission-node: itemjoin.lunar
    triggers: INVENTORY-*

Describe Alternatives Considered

Swap-item is only command execution, looking for a trigger execution instead.

Additional Context

No response

Checklist

  • I have read the wiki to make sure my request has not already been implemented.
  • I ticked all of these boxes without actually reading them.
  • I have checked that my feature request is unique and another request does not exist.