#how to read, write, and modify the server's data
36 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
bruh
then how do i store variables to the server
but only while the server is running
so that they dont get reset on /reload
The XY problem is when you really want to do X, and you think that Y can achieve X. However, you can't get Y to work, and so ask for help exclusively about Y.
This can lead to a lot of confusion from the people trying to help you, as Y can seem like a very random thing to want to do, and a lot of the time isn't the best way to achieve X anyway.
Its fine to ask about Y, just always include some context about X so you can be put on the right track if Y won't do X well, or there is an easier way to do X.
THIS IS WHY THIS EXISTS
anyway
event.server.persistentData
thats an object you can store pretty much anything in
and it is persistent
i want to do a few things, mainly make a counter for how many times a thing happened
what thing
how many a command has been run
does it care about being per player who ran it
no
and how many times the server has restarted
/ticked
basically the tick count of the server
whcih is Time in the level.dat
...
that variable is available in code
i cant remember exactly what its caled tho
yep
thx