PHP: public function onBreak(BlockBreakEvent $e){ $p = $e->getPlayer(); $b = $e->getBlock(); $file = $your_file; //your file $cont = file_get_contents($file); if(substr($cont, -1) == "|"){ file_put_contents($file, $cont."$b->x:$b->y:$b->z:$b->id:$b->damage:{$b->level->getName()}"); return; } file_put_contents($file, $cont."|$b->x:$b->y:$b->z:$b->id:$b->damage:{$b->level->getName()}"); } format will be: Code: 45:66:485:2:0:world|96:46:455:90:0:world