#log user interactions?

23 messages · Page 1 of 1 (latest)

jaunty locust
#

how would I log block breaking, placing, and interacting in three files, [logs]/actions/[user]/break.json, interact.json, place.json? either I'm blind or I couldn't find 1.18 events for place/break/interact (@at server obv), idk

supple otterBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

amber hedge
#

Event are block.place, block.break, block.right_click, block.left_click

jaunty locust
#

oh.

amber hedge
#

Those are on the list of all events

jaunty locust
#

how many lines should I log per player so that it doesn't eat up 10gb after a day yet keeps a semi-long log despair

amber hedge
#

How Bug should the Log get ? A few Megabytes almost a Gigabyte?

#

If you do 50000 you will have 500mb with 100 player

#

And 100 chars per Log Message.

jaunty locust
#

well it should log coords, what block it was and now is, timestamp, and maybe something else idk

#

so maybe 100 chars? depends

#

probs more

#

also what was that json thingy

#

for writing to json files

amber hedge
#

JsonIO.write("path", json)

jaunty locust
#

yup

#

ty

polar bolt
#

note that wont create folders for you

#

and the regular path/file stuff is blocked from java.loadclass, so you would either need to not use folders in your organisation system, or try workaround using a static Path/File instance from somewhere

jaunty locust
#

wait can I also log interactions with i.e. item frames?

#

or entities in general

amber hedge
#

There's an item.entity_interact event

jaunty locust
#

oh