Currently, there is no native event in the Script API to detect when a player equips an item (main hand/armor).
### Disadvantages of not having this event:
* Performance Lag: Developers must use `system.runInterval` every tick to scan players' inventories, causing heavy CPU overhead on servers/Realms.
* Code Complexity: Requires writing complex, inefficient caching systems just to compare previous and current item IDs.
* Inaccuracy: Swapping between two identical items with different durability/enchantments is difficult to detect via standard tick loops.
### Proposed Solution:
Add a built-in event like `world.afterEvents.playerEquipItem` that triggers instantly when a slot content changes, improving both performance and add-on capabilities.
Please sign in to leave a comment.
0 Comments