Closed NickNackGus closed 3 years ago
Hi, that is a good suggestion. It would be nice if you could create a PR since I am quite busy right now. How about the following:
ChestSort already calls the ChestSortEvent or something like that. That event could include a HashMap<ItemStack,List
If you have a better idea, feel free to do it another way ^^
I'm not sure how to link the issue to the pull requests properly yet, so here's the links: https://github.com/JEFF-Media-GbR/Spigot-ChestSort/pull/97 https://github.com/JEFF-Media-GbR/Spigot-ChestSortAPI/pull/1
I will have a look at that in the next days, thanks for the PR!
Just checking in - have you had a chance to look at this yet? Anything you need changed or explained? Or does this need example code to go with it?
Sorry I hadn't hat time yet. Does this break anything or is it just a "drag-and-drop" replacement if you know what I mean? ^^
Don't worry about it, I just wanted to make sure it wasn't forgotten :slightly_smiling_face: It doesn't change how the plugin behaved before, only add the ability to add more sort options.
Are you using your custom version already? I really don't have time to test it myself but if you say that it works, I will release it for the public :)
Actually, yes - I started using it on a live server with a couple hundred players a few weeks ago and haven't had any issues.
Is your feature request related to a problem? Please describe. The server I help develop has some server-specific categories that are difficult to sort with the available options. Our particular case is item tiers via lore text, with unrelated lore text on the lines above and below.
Describe the solution you'd like I would like an API to replace custom sorting placeholders with sorting keys provided by external plugins. I am flexible on the exact interface. We may be able to provide a pull request if we have the time and a proposed interface.
Interface ideas include:
Describe alternatives you've considered
{lore}
, placeholder, but that contains lore text we do not wish to sort by.{lore}
with a line number specified potentially being useful to others, but not in our case.Additional context N/A