Solved Efficient way of finding who placed a block

Discussion in 'Plugin Development' started by ImSxYN, Jul 9, 2015.

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

    ImSxYN

    I am trying to find the most efficient way of finding who placed a block at the location you have broken a block at. (Sort of like how CoreProtect works, but I still want the block to be broken) Ive thought about using Maps and storing data to files and reading from it but they don't seem like the best options.
     
  2. Well, there is only one way to do this for files, and that is to add a new key with subkeys to a file on every blockplaceevent. I'm pretty sure there is no other way to do this unless you go into databases..
     
  3. Offline

    Krumb069

    store the blocks in a file like this:
    Blocks:
    - world/123/456/789/Krumb069
    split with "/" to get block location and player
     
  4. Offline

    mythbusterma

    @ImSxYN

    Storing large amounts of data in a quickly accessible fashion is sort of what relational databases are meant for, you're going to see very long look up times if you're using a file, especially if you rely on extremely slow string parsing methods, as @Krumb069 erroneously suggested.
     
Thread Status:
Not open for further replies.

Share This Page