Watson icon indicating copy to clipboard operation
Watson copied to clipboard

[Feature Request] View container actions in a GUI

Open U5B opened this issue 2 years ago • 8 comments

The server I play on enables CoreProtect lookups and inspections globally (for every player). I use it to moderate my shop since the server uses a honor system, and requires shop owners to check for thiefs daily.

Description

If the player interacted with a container such as a chest, display the container actions of the player that have interacted in a chest. Shift right click a container that is highlighted to view container actions for that player.

Examples & Options

The GUI for a container could look something like this...

player time name type count +/- notes
Thief 6:05:00pm apple minecraft:apple 64 -
U5B_ 6:00:00pm apple minecraft:apple 64 +

removeDuplicateLogs

An option that would also be useful is removing duplicate (fodder) logs from players that add/remove the same item within a customizable timeframe. The only problem with this implementation is parsing custom name/lore to distinguish between same item types. If the player took the apples and gave it back 5 minutes later and the option removeDuplicateLogs was set to true and removeDuplicateLogsTime was set to 5m

Example 1: Before

player time name type count +/- notes
Generous_Gamer 6:03:00pm apple minecraft:apple 64 +
Generous_Gamer 6:02:00pm apple minecraft:apple 64 -
Generous_Gamer 6:01:00pm apple minecraft:apple 64 +
Generous_Gamer 6:00:30pm apple minecraft:apple 64 -
Generous_Gamer 6:00:00pm apple minecraft:apple 64 +

Example 1: After

player time name type count +/- notes
Generous_Gamer 6:00:00pm - 6:03:00pm apple minecraft:apple 64 +

Example 2: Before

player time name type count +/- notes
Generous_Gamer 6:03:00pm money minecraft:dragon_breath 1 +
Messy_Inventory 6:02:01pm Fancy Item minecraft:stone_sword 64 +
Messy_Inventory 6:02:00pm money minecraft:dragon_breath 64 -
Messy_Inventory 6:00:01pm Fancy Item minecraft:stone_sword 1 -
Messy_Inventory 6:00:00pm money minecraft:dragon_breath 64 +

Example 2: After

player time name type count +/- notes
Generous_Gamer 6:03:00pm money minecraft:dragon_breath 64 +
Messy_Inventory 6:00:01pm-6:02:01pm Fancy Item minecraft:stone_sword 2 +/-
Messy_Inventory 6:00:00pm-6:02:00pm money minecraft:dragon_breath 2 +/-

U5B avatar Apr 25 '22 16:04 U5B

As far as i know custom names/lore isn't saved by CoreProtect

vacla avatar Apr 25 '22 16:04 vacla

As far as i know custom names/lore isn't saved by CoreProtect

That is unfortunate. That means removeDuplicateLogs would not be very useful if there were multiple items with different custom names in the same container.

U5B avatar Apr 25 '22 17:04 U5B

Im unable to make a seperate gui for containers but you will be able to get if it was +/- of what coreprotect sents like taken/put or so, next version will also be everything translated according to what coreprotect sends so it might be difficult to implement this from that 5 items go to 1 item really.

vacla avatar Apr 25 '22 18:04 vacla

This is done in a wip that will be in next coreprotect version: https://gyazo.com/9f9279e0d41ada7377e660ff1e54533a

vacla avatar Apr 25 '22 20:04 vacla

This is done in a wip that will be in next coreprotect version: https://gyazo.com/9f9279e0d41ada7377e660ff1e54533a

Would it be possible to filter players in that example? I assume you will have that. For example, the ability to ignore a specific player (the shop owner for example).

U5B avatar Apr 26 '22 15:04 U5B

Yes, you will be able to exclude username name also with the search

vacla avatar Apr 26 '22 15:04 vacla

As far as i know custom names/lore isn't saved by CoreProtect

https://github.com/PlayPro/CoreProtect/issues/67 seems to be related. CoreProtect saves names/lore but doesn't display them. Just needs to be implemented

U5B avatar Apr 28 '22 18:04 U5B

If https://github.com/PlayPro/CoreProtect/pull/211 gets reopened and merged, I will be able to display this data in the UI also.

vacla avatar May 07 '23 14:05 vacla