Skip to content

PlayerDataProvider ​

interface · pocketmine\player\PlayerDataProvider · source

Handles storage of player data. Implementations must treat player names in a case-insensitive manner.

Methods ​

hasData() ​

php
public function hasData(string $name) : bool

Returns whether there are any data associated with the given player name.

loadData() ​

php
public function loadData(string $name) : ?\pocketmine\nbt\tag\CompoundTag

Returns the data associated with the given player name, or null if there is no data. TODO: we need an async version of this

saveData() ​

php
public function saveData(string $name, \pocketmine\nbt\tag\CompoundTag $data) : void

Saves data for the give player name.

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.