Putting items in a chest

  • 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 comminuty!

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

SoMuchWessel

Active Member
Apr 3, 2017
147
3
18
47
Category: Mechanic

Suggested name: -

What I want:
On my server i have a minigame like thing, that every player gets a chest with stuff. Some items in that chest are "soulbound". I used the enchantment Curse of Vanishing to make the soulbound. But what i want now is that players can get there items out of the chest, included the soulbound items, but that they now can not put those soulbound items in any chest.

Ideas for commands: -

Ideas for permissions: -

When I'd like it by: As soon as possible
 
Last edited:
OMG I have racked my brain for this one for hours now, and finally figured out a way to do it.
Here you go, try this

code_language.skript:
on inventory click:
    if inventory type of player's current inventory is "CHEST":
        if item is enchanted with curse of vanishing:
            cancel event
            wait 1 tick
            close player's inventory
            send "You can not put items enchanted with &6Curse of Vanishing&r into chests" to player

I hope this helps you!
 
OMG I have racked my brain for this one for hours now, and finally figured out a way to do it.
Here you go, try this

code_language.skript:
on inventory click:
    if inventory type of player's current inventory is "CHEST":
        if item is enchanted with curse of vanishing:
            cancel event
            wait 1 tick
            close player's inventory
            send "You can not put items enchanted with &6Curse of Vanishing&r into chests" to player

I hope this helps you!

Well done!
This works, but you now can not take items with curse of vanishing out of a chest.
Is this also possible?
 
Last edited: