On inventory open

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

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

BrownMee

Active Member
Apr 16, 2018
126
6
18
23
How to check if player's open their own inventory?
[doublepost=1587396899,1587393242][/doublepost]
Code:
on packet event play_client_client_command:
    if "ClientCommand" penum 0 of event-packet is equal to "OPEN_INVENTORY_ACHIEVEMENT":
        broadcast "s"

using thatpacketaddon. No errors but doesn't work in 1.14 :emoji_frowning:
 
Try this
code_language.skript:
on inventory open:
    if inventory name of player's current inventory is not set:
        broadcast "s"
 
You can also do something like this if your creating gui's:

Code:
on inventory open:
    if name of event-inventory != "the gui name" or "2nd gui name if there is":
        broadcast "this is the player's inventory!"
 
Doesn't broadcast anything :emoji_frowning:
You can also do something like this if your creating gui's:

Code:
on inventory open:
    if name of event-inventory != "the gui name" or "2nd gui name if there is":
        broadcast "this is the player's inventory!"
Try this
code_language.skript:
on inventory open:
    if inventory name of player's current inventory is not set:
        broadcast "s"
 
Maybe you should try to set the inventory name to default inventory name (when you open your inventory).
I'm sorry I don't know the default name, because I forget it + I'm not opening Minecraft right now.
I dont think there is name of default inventory of player. I can't find any ><
 
Status
Not open for further replies.