Skip to content

Conversation

@1robie
Copy link
Collaborator

@1robie 1robie commented Feb 1, 2026

This pull request introduces a new per-inventory setting to enable or disable the click limiter, allowing more granular control over click rate limiting in inventories. It also improves YAML parsing robustness and updates the click limiter logic to only apply when enabled at both the global and inventory level. Several interfaces and classes have been updated to support these changes.

Click Limiter Enhancements:

  • Added isClickLimiterEnabled and setClickLimiterEnabled methods to the Inventory and BaseInventory interfaces, and implemented them in ZInventory and VInventory to allow enabling/disabling the click limiter per inventory. [1] [2] [3] [4] [5] [6]
  • Updated InventoryLoader to read the click-limiter-enabled setting from configuration files, defaulting to true if not specified.
  • Modified InventoryDefault to propagate the click limiter setting from the loaded inventory.
  • Improved the PacketEventClickLimiterListener so that click limiting is only applied if both the global config and the specific inventory have the limiter enabled. [1] [2] [3]
  • Clarified the documentation in config.yml to indicate the limiter only applies to zMenu inventories.

YAML Parsing Improvements:

  • Enhanced YamlParser to handle integer, double, float, long, and boolean values correctly, and added a utility to convert map keys to strings, improving compatibility with YAML files that use non-string keys. [1] [2] [3]

Other Minor Improvements:

  • Minor code cleanups and improvements, such as using pattern matching for instanceof in ComponentMeta.
  • Cleaned up imports in InventoryLoader.

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