Suggestion: Shop pages permission
NyhmsQuest opened this issue ยท 2 comments
I wasn't sure where to write a suggestion so I'm doing it here.
I'd love to see support for a permission similar to shopkeeper.maxshops.<count>
that allows me to customize how many shop pages each player can have. More specifically I'm looking to make all players only have 1 page per shop while OP/Admins can have unlimited. Right now I've set it to be 1 page but that also counts for OP/Admin making it hard for me to update existing shops that exceeds 1 page and I need to go into the config to put more pages, reload the plugin, make the changes and set it back to 1 page.
Unlimited will never be supported, because lots of trades on a single shop cause other issues (e.g. lots of item data needing to be sent when a player opens the trading menu). Hence why there is a hardcoded limit of 10 pages for the config setting.
I can consider adding a permission for per-player max pages.
Though, there are a few potentials I am unsure about yet:
- Permissions are per-player. For admin shops, it makes no sense to take per-player permissions into account.
- If a player loses the permission for additional pages of trades, I am not sure how the user experience will be (need to test) if they have existing shops that exceed their new limit. You mentioned the trade setup to be a pain for admin shops when you changed the setting.
- There is the plan to allow players to share the same shops (manage together) with other players in the future. If one player has access to more pages than another player, this might affect the user experience there as well.
Another potential alternative could be to add separate settings for player and admin shops.
Unlimited will never be supported, because lots of trades on a single shop cause other issues (e.g. lots of item data needing to be sent when a player opens the trading menu). Hence why there is a hardcoded limit of 10 pages for the config setting.
I wasn't gonna use unlimited anyways, it was more a figure of speech.
I can consider adding a permission for per-player max pages.
Though, there are a few potentials I am unsure about yet:
- Permissions are per-player. For admin shops, it makes no sense to take per-player permissions into account.
Yes I agree admin shops shouldn't care for the per-player permission.
- If a player loses the permission for additional pages of trades, I am not sure how the user experience will be (need to test) if they have existing shops that exceed there new limit. You mentioned the trade setup to be a pain for admin shops when you changed the setting.
The players in my case wouldn't loose the permission, but if they were to loose it, they would no longer be able to edit any trades that are on any of the lost pages which of course isn't ideal. But again, would never happen in my case.
- There is the plan to allow players to share the same shops (manage together) with other players in the future. If one player has access to more pages than another player, this might affect the user experience there as well.
Yes this is something I never thought of when suggesting this and could have some unforseen problems.
Another potential alternative could be to add separate settings for player and admin shops.
This honestly would also work for me as what I'm trying to achieve is simply just have all players have access to just 1 page while admins/op's still has access to let's say 5 pages to edit admin shops.