PluginBugs / Issues-CosmeticsCore

Repository used to keep track of issues of my plugin CosmeticsCore
https://lonedev.gitbook.io/cosmeticscore/
0 stars 0 forks source link

Wardrobe organization #154

Closed AidenJules closed 1 year ago

AidenJules commented 1 year ago

Terms

Discord tag (optional)

AidenJules

Describe the solution you'd like

Hello! I was talking with ItzASecret in the discord server trying to troubleshoot any way to organize the wardrobe and we couldn't find one. I am trying to organize my cosmetics because I have tons of items and I would like them to have some sort of organization system so that all the hats from pack 1 can go before all the hats from pack 2. Same thing with other types of cosmetics. Maybe if there was a configuration addition that allowed defining the position in the wardrobe GUI, like the first slot is 1, then 2, etc.

Is your feature request related to a problem?

Yes, but it isn't a big problem? I tried alphabetically and alphanumerically remaining items inside of the config and thought that would fix the order of my items and it did for the first few items but the rest didn't, I got support on it and found out its not a feature and I should request it. The few that got organized appear to be a coincidence.

Describe alternatives you've considered

I currently just plan to have my wardrobe unorganized for the time being, I have put the name of the pack before the item so there's something defining that but the physical order itself will remain all over for now.

Additional context

I would really appreciate if this gets considered, I think this could help out tons of servers and it isn't just specific to my case<3

LoneDev6 commented 1 year ago

I'm sure order of cosmetics is based on their namespace+key. In order to order various packs you can just rename them accordingly.

Code:

        TreeMap<String, AbstractProperties> tmpReordered = new TreeMap<>(REGISTRY);
        REGISTRY.clear();
        REGISTRY.putAll(tmpReordered);

From the Java docs:

TreeMap: A Red-Black tree based NavigableMap implementation. The map is sorted according to the natural ordering of its keys

LoneDev6 commented 1 year ago

Duplicate of https://github.com/PluginBugs/Issues-CosmeticsCore/issues/158