1. Basic Command Syntax
text
/scriptevent my:chest <x> <y> <z> <itemId> <amount> [name] [lore] [keep] [lock] [place] [destroy] [enchants]
Use code with caution.
<button class="FTsWP RmjGdc IsqrXb" aria-label="Copy code text to clipboard." data-sfc-cp="" data-wiz-attrbind="disabled=hGWhtf_z/ggNWmb" data-sfc-root="c" data-sfc-cb="KjsqPd=&hGWhtf_y:UEmoBd" data-complete="true" data-copy-service-computed-style="font-family: Arial; font-size: 13.3333px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(173, 175, 184);"></button>
<button id="" class="FTsWP RmjGdc IsqrXb" aria-label="Copy code text to clipboard." data-sfc-cp="" data-wiz-attrbind="disabled=hGWhtf_z/ggNWmb" data-sfc-root="c" data-sfc-cb="KjsqPd=&hGWhtf_y:UEmoBd" data-complete="true" data-copy-service-computed-style="font-family: Arial; font-size: 13.3333px; font-weight: 400; margin: 0px; text-decoration: none; border-bottom: 0px rgb(173, 175, 184);"></button>
2. How to Add Items
To add items, use a positive number for the amount.
- Simple Example:
Add 10 Diamonds to a chest at 10, 64, 10:/scriptevent my:chest 10 64 10 minecraft:diamond 10 - Advanced Example (With Name & Lore):
Add a sword named "Excalibur" with lore:/scriptevent my:chest 10 64 10 minecraft:diamond_sword 1 "Excalibur" "The legendary blade\nSharp!" - Enchantment Example:
Add a Pickaxe with Efficiency 5 and Unbreaking 3:/scriptevent my:chest 10 64 10 minecraft:netherite_pickaxe 1 none none none none none none "efficiency:5,unbreaking:3"
3. How to Remove Items
To remove items, use a negative number for the amount. The script will look through the chest and delete that many items of the specified ID.
- Example:
Remove 5 Apples from a chest:/scriptevent my:chest 10 64 10 minecraft:apple -5
4. Argument Breakdown
If you want to skip an optional setting but need to reach one further down the list (like Enchantments), use the word
none for the ones you are skipping.| Argument | Description | Example |
|---|---|---|
| x y z | Coordinates of the chest. | 100 65 -20 |
| itemId | The namespace ID of the item. | minecraft:apple |
| amount | Positive to add, negative to remove. | 64 or -10 |
| name | Display name (use "quotes" for spaces). | "Super Sword" |
| lore | Hover text (use \n for new lines). |
"Line 1\nLine 2" |
| keep | Set to true to keep on death. |
true |
| lock | Prevents moving (slot or inventory). |
slot |
| place | Blocks item can be placed on (Adventure). | grass,dirt |
| destroy | Blocks item can break (Adventure). | stone,iron_ore |
| enchants | List of id:level separated by commas. |
sharpness:5,fire_aspect:2 |
Important Notes:
- Quotes: If your item name or lore has spaces, you must wrap it in
"double quotes". - Container Type: This works on chests, barrels, hoppers, dispensers, and droppers.
- Permissions: You must have operator permissions (OP) to run the
/scripteventcommand.

