Solved How do I put an item in an inventory at 1.15?

  • 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.

K1ng

Member
Jul 1, 2020
2
0
1
How do I put an item into an inventory slot in minecraft 1.15? I have been looking in the forum and in the documentation but I could not put an item.


Code:
on rightclick on a crafting table:
    if player is sneaking:
        cancel the event
        send "<red>!!!" to player
    else:
        play sound "block.beacon.activate" with volume 10 to the player
        send "<green>Crafting table open!" to player
        set {_inventory} to chest inventory with 6 row
        set slot 0 of {_inventory} inventory to diamond sword
        wait 0.1 ticks
        open chest inventory with 6 row named "Crafting Table" to player
an image of the inventory: https://prnt.sc/tav7rn
 
Status
Not open for further replies.