Skip to content

Conversation

@1robie
Copy link

@1robie 1robie commented Dec 17, 2025

This pull request introduces a new set of commands to reset shop limits (for all, player, and server scopes), improves the handling of item selling limits in the shop, and enhances the messaging and API to support these features. The most important changes are grouped below:

New limit reset command suite:

  • Added a new CommandShopResetLimit command with subcommands for resetting all limits, player limits, and server limits, including support for resetting by item or for all items. This includes the new files CommandShopResetLimit.java, CommandShopResetLimitAll.java, CommandShopResetLimitPlayer.java, and CommandShopResetLimitServer.java, and registers the new command in CommandShop. [1] [2] [3] [4] [5]

  • Extended the LimiterManager API to allow querying limits by LimitType and implemented this in ZLimitManager. [1] [2]

Shop selling logic and limit enforcement improvements:

  • Enhanced the logic for selling items in bulk (sellAllContent) to correctly enforce player and server sell limits, only allow selling up to the allowed limit, and update item amounts and prices accordingly. This includes tracking the total amount sold per action and updating how inventory is modified and results are reported. [1] [2] [3] [4] [5] [6] [7]

  • Updated the ShopAction class to track the total amount sold and provide methods for adjusting this value, supporting the new enforcement logic. [1] [2]

User-facing messages and descriptions:

  • Added new messages and descriptions to the Message enum for the new reset limit commands and their outcomes, improving user feedback.

Code quality and minor improvements:

  • Simplified imports in ZLimitManager and made minor improvements to method signatures and null checks. [1] [2] [3]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant