RPGInventory icon indicating copy to clipboard operation
RPGInventory copied to clipboard

Integration with ChestSort

Open osipxd opened this issue 4 years ago • 3 comments

It seems that RPGInventory can create items that the player should not be able to move in their inventory. Those however cannot be detected by ChestSort which means that the items get moved if the player uses ChestSort to sort their inventory. ChestSort has an API that can be used to tell ChestSort what items should not be movable. If you are interested in making both plugins compatible, you can softdepend on ChestSort, import the ChestSortAPI via maven or gradle and listen to the ChestSortEvent. Whenever the inventory contains one of the unmovable items, just use the method ChestSortEvent#setUnmovable(int slot) or #setUnmovable(ItemStack item).

osipxd avatar Jan 04 '21 19:01 osipxd

I'll just leave some links to the ChestSort API :)

General documentation: https://github.com/JEFF-Media-GbR/Spigot-ChestSort/blob/master/HOW_TO_USE_API.md

Javadocs for the ChestSortEvent: https://repo.jeff-media.de/javadocs/ChestSortAPI/de/jeff_media/ChestSortAPI/ChestSortEvent.html

mfnalex avatar Jan 04 '21 19:01 mfnalex

Since some more users requested this to me already, I can also create a pull request the following days if that would have any chance to be accepted? :)

mfnalex avatar Jan 16 '21 17:01 mfnalex

Yes. Feel free to write to me on Discord if you will have any questions about RPGInvntory API.

osipxd avatar Jan 16 '21 19:01 osipxd