Solved Saving Blocks

Discussion in 'Spigot Plugin Development' started by minecrft, May 16, 2016.

Thread Status:
Not open for further replies.
  1. Hello all!

    I'm just experimenting with some things (just becuz i'm bored). What would be the most efficient way of saving the coords of blocks? I could add them to a config but after a while that could cause a lot of lag. Any suggestions?
     
  2. Well if you need to save them through a server restart, then you have to save them in a config or database of some sort (depending on the size of your server). If you don't need to save them through a server restart, then you can just make a list that stores location data.

    For a config, you will want a method to delete and rewrite old location data that might build up over time if you are concerned about performance. If you want to squeeze out a bit more efficiency with your config/database files, you could make your own blockLocation object that stores only crucial data and contains your own loading and saving methods.
     
  3. @Hunky524, Thanks!

    I tried this and it works more efficiently then what I was previously working!

    Thanks,
    Jake B.
     
Thread Status:
Not open for further replies.