WiIIiam278 / HuskSync

A modern, cross-server player data synchronisation system
https://william278.net/project/husksync
Apache License 2.0
151 stars 122 forks source link

[request]"/inventory" Inventory is updated in real-time when items are taken out or put in #315

Closed CatBang closed 1 month ago

CatBang commented 1 month ago

When an admin uses "/inventory" on a player The Administrator takes any item from the player's backpack As long as the admin does not close the inventory screen, the player's inventory will not be updated During this time, the player can discard items Even if the player throws out all of the inventory, the administrator won't find out

Is it possible to implement a /invsee command like 'EssentialsX'? Inventory is updated in real time

WiIIiam278 commented 1 month ago

Thanks for your request. I have thought about this previously and decided not to implement this.

This would require syncing every inventory update in real-time among all inventory viewer(s) cross-server over Redis, which is intensive and complex for a plugin where the focus is player data syncing first and foremost. This would mean extensively handling every time the player modifies their inventory during this time - drops an item, picks up an item, puts stuff on their cursor, is given an item, etc, while accounting for multiple staff members being able to simultaneously modify their inventory. Implementing this over Redis with indeterminable latency while preventing duplication would make it the sort of feature that adds an enormous pile of code to maintain, increasing the surface area for bugs, which I don't deem to be worth it.

An alternative may be to lock users in place during invsee but that has it's own problems and reveals to the user that a moderator is inspecting their inventory. Overall, nice idea - but too tricky for a moderation feature at this time.

CatBang commented 1 month ago

Thanks for your request. I have thought about this previously and decided not to implement this.

This would require syncing every inventory update in real-time among all inventory viewer(s) cross-server over Redis, which is intensive and complex for a plugin where the focus is player data syncing first and foremost. This would mean extensively handling every time the player modifies their inventory during this time - drops an item, picks up an item, puts stuff on their cursor, is given an item, etc, while accounting for multiple staff members being able to simultaneously modify their inventory. Implementing this over Redis with indeterminable latency while preventing duplication would make it the sort of feature that adds an enormous pile of code to maintain, increasing the surface area for bugs, which I don't deem to be worth it.

An alternative may be to lock users in place during but that has it's own problems and reveals to the user that a moderator is inspecting their inventory. Overall, nice idea - but too tricky for a moderation feature at this time.invsee

It's a great idea to ban players from moving inventory during invsee👍