ChestSort icon indicating copy to clipboard operation
ChestSort copied to clipboard

Option to disable use of automatic sorting function and/or command

Open rqmacnguyen opened this issue 5 years ago • 5 comments

Describe the solution you'd like A separate permission node that allows/prevents users from being able to toggle autosorting via commands without affecting the ability to sort via hotkeys with the end goal of making this plugin a little more compatible with other inventory plugins.

rqmacnguyen avatar Jun 25 '20 22:06 rqmacnguyen

Thanks for the request, I guess you are the one who requested it in the SpigotMC discussion :)

Do you have any idea how we could call those permissions?

Right now we have:

  • chestsort.use
  • chestsort.inventory.use

mfnalex avatar Jun 26 '20 00:06 mfnalex

Perhaps splitting chestsort.use to differentiate the two methods would suffice:

  • chestsort.use.autosort
  • chestsort.use.hotkey

Not very creative, but I think it would get the job done.

rqmacnguyen avatar Jun 26 '20 00:06 rqmacnguyen

I would suggest this:

  • chestsort.sort
  • chestsort.autosort
  • chestsort.inventory.sort
  • chestsort.inventory.autosort

Also, the /chestsort hotkeys command should only be allowed if the player has either the chestsort.sort or chestsort.inventory.sort permissions.

This will however break existing permission configs, so I am not sure if I should it like this because I am sure there will be complaining that it's "not working anymore" lol. I will think about this

mfnalex avatar Jun 26 '20 11:06 mfnalex

Ah, I hadn't thought of that. Originally I thought that the nodes could piggy back off of the chestsort.use node and if permissions were granted to that, it would allow autosorting and hotkeys by default, thus allowing admins to disable one or the other if they so choose. However, tbh, I'm not actually aware of the details of how permissions work, so if changing up the permissions is not an option, then maybe a parameter in the config file to disable auto sorting (and basically ignore permissions) could be an alternative solution.

rqmacnguyen avatar Jun 26 '20 18:06 rqmacnguyen

https://www.spigotmc.org/threads/1-8-1-16-chestsort-api.334121/page-22#post-3859692

mfnalex avatar Jun 30 '20 00:06 mfnalex