EndlessCodeGroup / RPGInventory

Custom inventory for Minecraft servers
https://www.spigotmc.org/resources/11809/
GNU General Public License v3.0
40 stars 18 forks source link

Integration with ChestSort #167

Open osipxd opened 3 years ago

osipxd commented 3 years ago

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).

mfnalex commented 3 years ago

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 commented 3 years ago

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? :)

osipxd commented 3 years ago

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