Jump to content

Detecting when the player tries to open their inventory 1.15


AMRAAM

Recommended Posts

Hello!

Is there a good way to detect if a player is trying to open their inventory? I want to open some other container is some cases when they do that.
This is only server side. I also want to make sure that in the case where I want to open a different container instead they are 100% unable to take their armor off. I think that may not be possible tho, because it might just be up to the client to modify its inventory and send the changes to the server (like it can say "hey I moved my helmet to slot 35, cool?") But not sure on that, if this is not possible it's not that big of deal, but I will need another solution to make sure they can't move their armor into their inventory (thinking of tagging their armor with something like "disallowed" and then periodically checking if they somehow managed to get a disallowed item).

Thanks

Link to comment
Share on other sites

Continuing this topic I still want to prevent a lot of inventory interaction, is it possible to mess with the itemstack held by the cursor from the server?
Only the client appears to know about that, how is that possible, the inventory actually changes when the client picks up an item from their inventory, the server has to know about the new empty slot, or is that it, just a new empty slot that appears? As far as the server is concerned, where is the itemstack that is being held?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.