data; } public function setSaveData(CompoundTag $data) : void{ $this->data = $data; } /** * Returns the username of the player whose data is being saved. This is not necessarily an online player. */ public function getPlayerName() : string{ return $this->playerName; } /** * Returns the player whose data is being saved, if online. * If null, this data is for an offline player (possibly just disconnected). */ public function getPlayer() : ?Player{ return $this->player; } }