i have a config db like this: Code: d4f6d43b-4989-3ab0-9d03-80694e247ebb: game_level: 22 xp: 23565 xp_left: 23629 karma: 17144 coins: 1915.000000 xp_left_show: 64 broken_blocks: 0 language: english name: HerryYT d4f6d43b-4989-3ab0-9d03-20694e2443bb: game_level: 22 xp: 23565 xp_left: 23629 karma: 17144 coins: 1915.000000 xp_left_show: 64 broken_blocks: 0 language: english name: OtherUser the first value is player uuid, how can i get the array by the name? like i wanna add coins to this player, i have only his name, how do i get coins from his name?
Oh i figured out myself... Code: foreach($this->data->getAll() as $key => $data) { if ($data["name"] == $player->getName()){ echo $data["coins"]; var_dump($data); } /*if ( $data[$field] === $value ) return $key;*/ }