Solved Enchanted items and ender chest items?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

dudle

Active Member
Jan 31, 2017
135
0
16
how to place enchanted items into a chest? Like:
add 1 iron helmet enchanted (with) protection 1 doesn't work?

also, how can I add items to an ender chest and so they'll be displayed?
[doublepost=1518212930,1518181249][/doublepost]pls
 
1. You use the following format for an item with enchantments:
code_language.skript:
[<amount> [of]] <item type> [of <enchantments>]
Example:
code_language.skript:
add leather helmet of sharpness 1 to player's inventory

set player's tool to 20 sticks
2.
  • You have to first get the location of the ender chest like this:
    code_language.skript:
    set {_location} to location(0, 4, 0, world("world"))
  • Now you just add the item to the inventory of the block at that location
    code_language.skript:
    add 1 iron helmet of protection 1 to inventory  of block at {_location}
Now, if you meant someone's ender chest, you'd do:
code_language.skript:
add 1 iron helmet of protection 1 to player's ender chest
 
Status
Not open for further replies.