Tracking whether player open their own inventory

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

LMKgaming

Member
Mar 13, 2025
21
1
3
I don't know how to check when player open there own inventory, like pressing key "E" (default key in Minecraft).
I have tested with on inventory open event but this not work with player's inventory.
Anyone know please help me.
 
what do you need it for. there are other events that can be used in place of a on inventory open: line
 
what do you need it for. there are other events that can be used in place of a on inventory open: line
I want to make player can continue pickup item even their own inventory is full, but I don't know how to do that.
I have an idea that I always delete at least 1 slot in inventory to make pickup item naturally, and when player open their own inventory, I can track and reset that slot back to right item
 
i have not tested this in a server environment but it should work
Code:
on load:
    set {list::*} to ""
    set {LargestNum} to 0

on pick up:
    if player has enough space for 1 air:
        set {item} to event-item
        
command /getitems:
    trigger:
        loop (size of {list::*}) times:
            give {list::%loop-value%} to player
 
i have not tested this in a server environment but it should work
Code:
on load:
    set {list::*} to ""
    set {LargestNum} to 0

on pick up:
    if player has enough space for 1 air:
        set {item} to event-item
       
command /getitems:
    trigger:
        loop (size of {list::*}) times:
            give {list::%loop-value%} to player
I don' think the event on pick up will work (tested and not work) because player's inventory is full so the natural pick up will not fire.