Jump to content

Not Saving Player Preferences

Closed 0.1.5 0.1.5

dustyhansen
dustyhansen

Posted

When a player does /twig warn (or in my case /decay warn because i changed it), it removes the warning for their current session, but when they log off it doesn't save their setting. So the next time they login they get the warning again.

I checked the data file and it is empty and hasn't been modified in over a month, which is when I installed the plugin I think, so it looks like it is not writing anything to the data file at all when players use the command.

I assume this is a bug?

TwigsDecay (1).json

IIIaKa

Posted

Changed Status from Pending to Work in Progress

IIIaKa

Posted

@dustyhansen
Hi, thank you for reaching out.
Try re-downloading the plugin, the issue should be resolved. Values are saved when the plugin is unloaded/reloaded or when the server is shutdown/restarted.

  • Like 1
IIIaKa

Posted

Changed Status from Work in Progress to Closed

Changed Fixed In to 0.1.5

IIIaKa

Posted

If the issue persists, feel free to report it in this thread.

dustyhansen

Posted

I updated the plugin and then did /decay warn and the data file is still empty:

{
  "List of players.": {}
}

Nothing seems to write to this data file.

IIIaKa

Posted

9 hours ago, dustyhansen said:

I updated the plugin and then did /decay warn and the data file is still empty:

{
  "List of players.": {}
}

Nothing seems to write to this data file.

After entering the command, did you reload the plugin or the server? I made the save to a file only during unload plugin to avoid unnecessary operations.

dustyhansen

Posted

7 hours ago, IIIaKa said:

After entering the command, did you reload the plugin or the server? I made the save to a file only during unload plugin to avoid unnecessary operations.

No, I didn't. So you are saying that it will only write to the file when the server restarts?

IIIaKa

Posted (edited)

4 hours ago, dustyhansen said:

No, I didn't. So you are saying that it will only write to the file when the server restarts?

Yes, when the server or plugin is restarted, the data will be saved in a .json file.
This will reduce save operations and the file is only needed during the plugin initialization/load to retrieve previously saved values. After that, the file is no longer required.

Edited by IIIaKa
1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.4k

Files Sold

Total number of files sold.

2.1m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.