Solved Saving player data - any difference?

Discussion in 'Spigot Plugin Development' started by DMan16, Jun 28, 2021.

Thread Status:
Not open for further replies.
  1. I want to save a player's data to disk, same way it's saved when the player disconnects.
    I know about Player#saveData, but I was wondering if anyone knows if there's a difference between this and the disconnect save (is all the data saved the same, or does it only save certain data like location and inventory?) - there's no mention about any difference, just wanted to make sure.
    If not, then is there a different way to save the player's data? Maybe I should look into Server#savePlayers instead?

    Thx for the help in advance!
  2. sees alerts
    Oh wow, a conveniently created thread about creating player's data! It's a resource, so I guess I'd check it.
    enters the thread
    Duck. Again.

    P.S. It's not a resource mate :) I am sorry I can't help you with this topic, but don't mislead people with the Resource tag. Thanks!
  3. Server#savePlayers uses the same internal method as Player#saveData and when the player disconnects it uses the same method again.

    Also yeah, please remove the Resource tag.
    • Like Like x 1
  4. Whoops, sry, no idea why it checked Resource...

    Thx! Just wanted to make sure cuz the internal coding showed them using different stuff.
    And I'll change the tag - no idea why it changed it...
Thread Status:
Not open for further replies.