OpenInv icon indicating copy to clipboard operation
OpenInv copied to clipboard

Suggestions for inventories

Open ArtelGG opened this issue 5 years ago • 6 comments

Here's a list of things you guys should try to add for online players' inventories:

  1. Show what the player has attached to their cursor; image

1.a Just in case it's not already a thing, the player's off-hand slot for newer versions.

  1. Show what the user has in their crafting inventory, including the result slot; image
  2. Have an item formatted with the user's potion effects, UUID, perhaps their hunger and saturation, gamemode, location, etc.

ArtelGG avatar Oct 08 '18 07:10 ArtelGG

Are users really hiding things in these (temporary) slots?

  1. IMO is outside the scope of the plugin, this generic info can be found in many other plugins.

RoboMWM avatar Oct 08 '18 08:10 RoboMWM

There are instances where users who are trying to hide an item will pick the item up in their cursor to hide it from others (most likely staff) trying to find said item until they give up. Also, some modified clients can make it so the four crafting slots can be changed to store items rather than drop them when the inventory is closed.

ArtelGG avatar Oct 08 '18 08:10 ArtelGG

1 and 2 I'll look into. 3 is included in #54 to a degree, probably more in line for an addon. Offhand slot is already handled. I won't show the crafting result slot - that should not be insertable by the client. If it is, that's really on the server implementation to prevent. I believe actual anticheat features to be outside of the scope of OI.

Jikoo avatar Oct 08 '18 09:10 Jikoo

1 and 2 I'll look into. 3 is included in #54 to a degree, probably more in line for an addon. Offhand slot is already handled. I won't show the crafting result slot - that should not be insertable by the client. If it is, that's really on the server implementation to prevent. I believe actual anticheat features to be outside of the scope of OI.

Sounds good. If the crafting result slot is just a simple grab of a slot ID think you could implement it anyway?

ArtelGG avatar Oct 08 '18 10:10 ArtelGG

There's no reason to show the crafting result slot if the client can't store an item in there, which I see no reason why it would be able to.

RoboMWM avatar Oct 08 '18 18:10 RoboMWM

Sounds good. If the crafting result slot is just a simple grab of a slot ID think you could implement it anyway?

After some thought, no. It looks simple, but then you start to consider what do we do if the viewer modifies the result. Do we rewrite all of OpenInv's click handling so the viewer can't modify the result slot? Do we "craft" the item, and do we then have to manually include all crafting logic? Gets messy and time-consuming very quickly.

The server should be rejecting inserts to that slot, so there's no need for it. It's not a simple addition.

Jikoo avatar Oct 19 '18 12:10 Jikoo