Getting the player that placed a certain block

Discussion in 'Plugin Development' started by nuno1212sss, Apr 6, 2014.

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

    nuno1212sss

    I need to know if there is a possibility to check if a block has been placed by a player, or by a plugin, I wish to do this so that I can add an "Block Fortune" wich is a regular fortune but if the block has been placed by a player it just drops 1, and if it was put there by a plugin such as Mine Reset Lite it gives you more than one block depending on the Fortune in the player's pickaxe!
    I don't have much code for this yet because I am stuck with this problem, if anyone could help me, it would be awsome :D
     
  2. Offline

    Barnyard_Owl

    You'd have to log each block that was placed -- which is why plugins like LogBlock and BigBrother have such massive files which they produce. I suppose you could just take note of the BlockPlaceEvent to see if it was a player that did it, but you'd still have to log it somehow.
    There's no other way to do it, as far as I know, unless you want to modify Mine Reset Lite's code or hook into it somehow.
     
  3. Offline

    nuno1212sss

    Barnyard_Owl well if it was about logging block's I could do it in no time but, that's exactly what I want to prevent, 1ºs because it lag's the server, by writing to a file so often, 2ºnd it is very slow and unefficient but if that is the only way I guess I have to do it...
     
Thread Status:
Not open for further replies.

Share This Page