Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Right-click on open shulker boxes/crafting stations to return to normal inventory view #12

Open
takatalvi opened this issue Mar 12, 2024 · 6 comments
Labels
enhancement New feature or request mojang-please-fix Minecraft vanilla client is missing something to make this feature possible needs-api Spigot API is missing something to make this feature possible wontfix This will not be worked on

Comments

@takatalvi
Copy link

takatalvi commented Mar 12, 2024

Hi, I'm very happy with the plugin and thanks to the permission nodes, i can give my players inventory enhancements based on their advancement completion, which is perfect. The plugin works really well, there are no bugs, no lagging, it's just seamless. I was just wondering if it's possible to trigger opening the main inventory when you right-click on the currently opened shulker box or other item.

When you open the inventory, you right-click a shulker box and the GUI changes to its inventory. The shulker box itself is still visible in its slot, but it can't be moved (for a good reason). You can open a different box by clicking on it, which is perfect, but you can only return to your main inventory by closing the GUI and opening it again. So I was thinking if clicking (righ-clicking?) the shulker box could return you back to your main inventory screen. It would make the usage even more dynamic, but I'm not sure if the actions and events allow for this.

Anyway, thanks for reading and thanks for this wonderful QoL plugin :)

@percyqaz
Copy link
Owner

Hi there, I'm very pleased to hear you're enjoying the plugin :)
The whole purpose of the plugin is QoL and making inventory management more seamless, so I like this suggestion a lot, thanks

For your (and also my) insight, here's how I currently use the plugin:

  • I have all my shulker boxes + crafting stations in my ender chest
  • I open the ender chest with a right click
  • Then I open any of my shulker boxes/crafting stations with a right click

Now, my shulker boxes/crafting stations aren't visible any more, I can only see my own inventory and the shulker box's contents

But now I can:

  • Right click on the ender chest to go back to that screen
  • Right click on the ender chest while it's open to close it, and I'm back on my inventory

So it looks to me like I already did this for enderchests, and simply overlooked this for everything else
I don't see why I can't add this behaviour for open shulker boxes and open crafting stations too, but there may have been some other annoyance by enabling it that I deliberately avoided when I originally made the plugin

I'll have a go at making this change when I next have some free time and report back either with a new release or any issues I find

@percyqaz percyqaz added the enhancement New feature or request label Mar 12, 2024
@percyqaz percyqaz changed the title Feature request: When having a shulker box inventory open, right-clicking the shulker box returns you to the main inventory Right-click on open shulker boxes/crafting stations to return to normal inventory view Mar 12, 2024
@takatalvi
Copy link
Author

Thank you for the quick reply, it sounds really promising. Seems like if it's possible for the ender chest, it should be doable for other objects as well, right? Even if it might be a bit of a niche use case, I think it would be worth adding at least for parity.
On my server, I'm not planning on allowing ender chest access and crafters just yet, maybe over time as rewards for further survival progress. But I'm sure there are many users of the plugin who will appreciate the improved user experience. I'm really curious what will come out of this, but if it works out, it will be just perfect. Crossing my fingers :)

@percyqaz
Copy link
Owner

percyqaz commented Mar 12, 2024

Foolish quote from me earlier today (clueless):

Right click on the ender chest while it's open to close it, and I'm back on my inventory

I misremembered this, and I now remember my thought process when I originally wrote the majority of the plugin

When you right click on an open ender chest, it actually closes your inventory window entirely
It is unfortunately not possible for a plugin to tell your Minecraft client to open the normal inventory screen (see this forum post and lots like it) - there is simply not a packet in the protocol you can send for this, opening the normal player inventory can only be done by the client when pressing the inventory key

This leaves only the option to close the inventory screen entirely (so you are looking at the world again) upon right clicking something that's open

I'm sure I knew this last year, and that's why I didn't bother making the plugin completely kick you out of the inventory screen when right clicking on something that's open - it feels worse/more abrupt to me in testing than if it just did nothing

Therefore I'm sorry to say this feature is impossible right now when playing with a vanilla client, unless Mojang changes the protocol (the same kind of thing prevents the plugin working in the creative menu) :(

What do you think about right-clicking on open containers closing the screen entirely?
I can add that for consistency with ender chests, but I'm currently thinking it isn't worth it as it's slower than just pressing the inventory key (I believe this was also my reasoning last year)

@percyqaz percyqaz added needs-api Spigot API is missing something to make this feature possible mojang-please-fix Minecraft vanilla client is missing something to make this feature possible wontfix This will not be worked on labels Mar 12, 2024
@takatalvi
Copy link
Author

takatalvi commented Mar 12, 2024

I can't say I wasn't expecting a roadblock like this, I completely understand. In that case, maybe it could be solved by an option in the config? something like close-inventory-on-click: true/false
I don't want to disrupt the existing behavior, but if it's not too much work, maybe it would be helpful in some cases. I know pressing the inventory key or Esc is quicker in most cases, but at least in my experience, it can be comfortable to have more options, like also using the mouse. I'll leave it up to you, I like the plugin in the current state and plan on keeping it. Thank you :)

@percyqaz
Copy link
Owner

I may bundle a setting like that with a future update alongside some bigger feature request, but for now I'll leave things as they are

This issue will join the graveyard of open issues to act as future documentation for others that may request the same

Thanks again for using the plugin and your feedback, this is the exact type of feature request I enjoy actioning (even though it was unsuccessful in this case)

@takatalvi
Copy link
Author

Understood, thank you as well. It's always a pleasure with a developer who's interested in the users' feedback :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mojang-please-fix Minecraft vanilla client is missing something to make this feature possible needs-api Spigot API is missing something to make this feature possible wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants