Closed mindw0rm closed 4 years ago
Thank you for the feature request.
I will have a look at this, however I have not worked with custom Spigot events so I have no idea how to implement it this way.
The max-x and max-z config options seems a bit odd to me, because probably noone would use it.
The worldguard region flag seems a good idea, though. I will have a look at the WorldGuard API and reply to this later.
I just had a look at the Spigot Event API and it seems waaaay easier to just create a custom event than custom WorldGuard flags. So, I would implement a custom event called ChestSortEvent or something similar that will be canceable if this is okay for you?
Please try the 8.8.3-pre1 version which is available here: https://github.com/JEFF-Media-GbR/Spigot-ChestSort/releases/tag/8.8.3-pre1
Let me know if everything is working as expected.
Does it work as expected?
Sorry I hadn't time to test it yet, I'll notify you.
It works as expected.
Thanks :)
You‘re welcome, it will be included in the next official release on SpigotMC :)
Now included in the 8.9 version which is also the first release in our new maven repo
Is your feature request related to a problem? Please describe. I would like to generally allow the sorting of chests, but disable it for one or more specific regions of a world. To elaborate: we have a mine game on our server where every player is allowed to pick exactly one itemstack from each chest inside the game area. There are multiple stacks of the same item in a single chest which should not be combined when the chest is opened / closed / a sort hotkey used.
Describe the solution you'd like I see multiple possibilities to solve this for us:
Describe alternatives you've considered Disable Chestsort completely during games (which is 1-2h every few months, plus a few days of setup). This of course has the disadvantage that chest can't be sorted outside the game area during that time.
Additional context We have our own plugin to handle the game, so the solution which imho is easiest to implement (event that can be cancelled) is quite sufficient. Other use cases (which I can't think of right now ;) ) might require a solution that doesn't depend on being able to add event listeners.