PocketMine-MP 5.16.1 git-585aee9386a787c95e73dd0a05ffca8329606b68
pocketmine\nbt\TreeRoot Class Reference
+ Collaboration diagram for pocketmine\nbt\TreeRoot:

Public Member Functions

 __construct (Tag $root, string $name="")
 __toString ()
 equals (TreeRoot $that)
 getName ()
 getTag ()
 mustGetCompoundTag ()

Detailed Description

This class wraps around the root Tag for NBT files to avoid losing the name information.

Definition at line 32 of file TreeRoot.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\nbt\TreeRoot::__construct ( Tag  $root,
string  $name = "" 

Definition at line 39 of file TreeRoot.php.

Member Function Documentation

◆ __toString()

pocketmine\nbt\TreeRoot::__toString ( )

Definition at line 69 of file TreeRoot.php.

◆ equals()

pocketmine\nbt\TreeRoot::equals ( TreeRoot  $that)

Definition at line 65 of file TreeRoot.php.

◆ getName()

pocketmine\nbt\TreeRoot::getName ( )

Definition at line 61 of file TreeRoot.php.

◆ getTag()

pocketmine\nbt\TreeRoot::getTag ( )

Definition at line 44 of file TreeRoot.php.

◆ mustGetCompoundTag()

pocketmine\nbt\TreeRoot::mustGetCompoundTag ( )

Helper to reduce boilerplate code for most common NBT usages that use Compound roots. TODO: this ought to be replaced by schema validation in the future

NbtDataExceptionif the root is not a Compound

Definition at line 54 of file TreeRoot.php.

The documentation for this class was generated from the following file: