Skip to content

Enhance ColorUtils, cooldown management, and item loading features - #256

Open
1robie wants to merge 7 commits into
Maxlego08:developfrom
1robie:developement
Open

Enhance ColorUtils, cooldown management, and item loading features#256
1robie wants to merge 7 commits into
Maxlego08:developfrom
1robie:developement

Conversation

@1robie

@1robie 1robie commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces several improvements and new features across the codebase, primarily focusing on enhancing inventory storage, packet event handling, color parsing, and concurrency safety. The most significant changes include new APIs for tracking player world visits, improvements to packet event click limiting, color parsing fixes, and thread-safety enhancements in packet listeners.

Inventory Storage and Player World Tracking

  • Added new methods getVisitedWorlds and markWorldVisited to the StorageManager interface for tracking which worlds a player has visited. Also introduced the FirstWorldJoinDTO data transfer object and a new table constant FIRST_WORLD_JOIN in Tables. [1] [2] [3]

Packet Event Handling and Click Limiting

  • Refactored PacketEventClickLimiterListener to implement both PacketListener and InventoryListener, track players with click limiting enabled, and register/unregister them on inventory open/close. The listener now uses thread-safe collections and is properly registered in the plugin lifecycle via the new onPostEnable method in PacketManager. [1] [2] [3] [4] [5] [6] [7]

Concurrency and Thread Safety

  • Updated several packet listeners (PacketAnimationListener, PacketTitleListener) to use ConcurrentHashMap and volatile fields for better thread safety. [1] [2]

Color Parsing and Clamping

  • Improved ColorUtils.parse to correctly handle arrays of different lengths and ensure all color components are clamped to valid ranges, preventing out-of-bounds color values. [1] [2]

Miscellaneous Improvements

  • Fixed a bug in ZInventory where items are now properly cleared from the player inventory when collecting session items, and adjusted the storage size to a maximum of 36 slots.
  • Updated CraftEngineLoader to pass the player to the item builder for more context-aware item creation.

These changes collectively improve the robustness, maintainability, and feature set of the codebase.

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