How to store placed/destroyed blocks for remove/respawn it later?

Discussion in 'Plugin Development' started by bars96, Jan 2, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    bars96

    What is the best and low RAM/CPU usage way to store that blocks?

    ID block_coordinates_where_it_was_destroyed time_until_destroyed_block_will_respawn
    ID block_coordinates_where_it_was_placed time_until_placed_block_will_despawn
     
  2. Offline

    Forseth11

    bars96 Depends what you want to use it for. Either use an ArrayList or a HashMap. For a hash map you would have the location and the block as the data for it.

    EDIT: Then on restart or reload you can save it to a config if needed.
     
Thread Status:
Not open for further replies.

Share This Page