Question Clearing crafting slots/item on cursor to prevent inventory exploit


New member
Jul 21, 2023
How can I clear the player's crafting slots and item on cursor to prevent them from having specific items in places they shouldn't?

In the example below I use a common hack called 'Inventory Tweaks' (sometimes known as extra carry or inventory) which allows you to store items in your crafting slots/cursor and have them persist through closing your inventory. This is a huge issue as it is simple to create a mod with this feature and it would allow players to use items from multiple kits, unbalancing gameplay.

I have looked into replacing the inventory slots but I can't seem to find a method of achieving this as the crafting slots have IDs 1-4, the same as the player's regular inventory. player.inventory.clear() doesn't seem to clear the crafting slots or cursor, only the main inventory and armor slots.



Paper Triage
Staff member
Jul 11, 2022
Lublin, Poland
As far as the server is concerned the player always has their inventory open.
I guess try clearing those slots after the PlayerMoveEvent (not sure if that wouldn't also clear them when the player is moved by e.g. water).