> For the complete documentation index, see [llms.txt](https://l-shop-en.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://l-shop-en.gitbook.io/documentation/software-api/permissions/receiving-data.md).

# Receiving data

For receiving permissions data, an object of type `App\Services\Game\Permissions\Storage` is used. For LuckPerms implementation of this interface is a class `App\Services\Game\Permissions\LuckPerms\Storage`.

### Player <a href="#igrok" id="igrok"></a>

You can get the object of the player using the following methods:

* `App\Services\Game\Permissions\Storage::retrievePlayerByUser()` - Allows you to get the object of the player of the transferred user.
* `App\Services\Game\Permissions\Storage::retrievePlayerByUsername()` - Gets the object of the player that has the username passed.
* `App\Services\Game\Permissions\Storage::retrievePlayerByUUID()` - Gets the object of the player that has the UUID transmitted.

For example:

```php
$player = $storage->retrievePlayerByUsername('admin');
```

In the event that the specified player does not exist, the methods return `null`.

### Group <a href="#gruppa" id="gruppa"></a>

You can obtain a group object by using the `App\Services\Game\Permissions\Storage::retrieveGroup()` method. It searches for the transferred group name.

For example:

```php
$group = $storage->retrieveGroup('admins');
```

In the event that the specified group does not exist, the methods return `null`.
