RockinChaos / ItemJoin

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

[QUESTION] Overwriting and deleting an item #573

Closed Everts0n closed 2 months ago

Everts0n commented 10 months ago

Server Version

PaperSpigot 1.18.2

Resource Version

ItemJoin v6.0.4

Dump Information

none

Describe The Problem

How can I make that the item is not deleted, but simply moved to an empty space in the inventory? (or dropped) My players don't like that an item in the inventory is completely removed (overwriting) and replaced with another item (for example in slot 0)

Additional Context

No response

Checklist

RockinChaos commented 10 months ago

Apologies for the slow response, Since you didn't provide your dump information I can't tell you exactly what to do since I am unsure how you are setup.

However, I think the following itemflags you may find to be what you are looking for. Simply choose what you need and add it to your item(s) itemflags list.

Snippet from the wiki: give-next - This will function similar to the Arbitrary slot idea, any item with a dedicated number slot from 0 to 35 with this itemflag will function as normal if the dedicated slot is empty. However, if it is full, it will give the item in the next available slot AFTER the preceding dedicated slot. The Arbitrary would simply give the item to the first available slot rather than the slot after the dedicated slot.

move-next - If an item with this flag is set to be given, and the slot where the item should be set in is already full, it will move the old item to another slot to make room for the custom item.

drop-full - This simply gives the item the ability to drop itself onto the ground when attempting to give the item to the player. The item will drop if the player's inventory is full. This functionality works with any slot type including custom and arbitrary slots.

EDIT: Closing due to inactivity.