PocketMine-MP 5.14.2 git-50e2c469a547a16a23b2dc691e70a51d34e29395
|
Public Member Functions | |
__construct (array $value=[], int $tagType=NBT::TAG_End) | |
__clone () | |
__toString () | |
count () | |
empty () | |
equals (Tag $that) | |
first () | |
get (int $offset) | |
getAllValues () | |
getCount () | |
getIterator () | |
getTagType () | |
getType () | |
getValue () | |
insert (int $offset, Tag $tag) | |
isset (int $offset) | |
last () | |
pop () | |
push (Tag $tag) | |
remove (int $offset) | |
safeClone () | |
set (int $offset, Tag $tag) | |
setTagType (int $type) | |
shift () | |
toString (int $indentation=0) | |
unshift (Tag $tag) | |
write (NbtStreamWriter $writer) | |
Static Public Member Functions | |
static | read (NbtStreamReader $reader, ReaderTracker $tracker) |
Protected Member Functions | |
getTypeName () | |
makeCopy () | |
stringifyValue (int $indentation) | |
Static Protected Member Functions | |
static | restrictArgCount (string $func, int $haveArgs, int $wantMaxArgs) |
Protected Attributes | |
$cloning = false | |
@phpstan-implements \IteratorAggregate<int, Tag>
Definition at line 39 of file ListTag.php.
pocketmine\nbt\tag\ListTag::__construct | ( | array | $value = [] , |
int | $tagType = NBT::TAG_End |
||
) |
Tag[] | $value |
Definition at line 53 of file ListTag.php.
References pocketmine\nbt\tag\ListTag\push().
pocketmine\nbt\tag\ListTag::__clone | ( | ) |
Definition at line 280 of file ListTag.php.
pocketmine\nbt\tag\ListTag::count | ( | ) |
Definition at line 88 of file ListTag.php.
pocketmine\nbt\tag\ListTag::empty | ( | ) |
Returns whether there are any tags in the list.
Definition at line 191 of file ListTag.php.
pocketmine\nbt\tag\ListTag::equals | ( | Tag | $that | ) |
Compares this Tag to the given Tag and determines whether or not they are equal, based on type and value. Complex tag types should override this to provide proper value comparison.
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 305 of file ListTag.php.
pocketmine\nbt\tag\ListTag::first | ( | ) |
Returns the element in the first position of the list, without removing it.
Definition at line 160 of file ListTag.php.
pocketmine\nbt\tag\ListTag::get | ( | int | $offset | ) |
Returns the tag at the specified offset.
OutOfRangeException if the offset is not within the bounds of the list
Definition at line 150 of file ListTag.php.
pocketmine\nbt\tag\ListTag::getAllValues | ( | ) |
Returns an array of tag values inserted into this list.
Definition at line 79 of file ListTag.php.
pocketmine\nbt\tag\ListTag::getCount | ( | ) |
Definition at line 92 of file ListTag.php.
pocketmine\nbt\tag\ListTag::getIterator | ( | ) |
Definition at line 299 of file ListTag.php.
pocketmine\nbt\tag\ListTag::getTagType | ( | ) |
Returns the type of tag contained in this list.
Definition at line 206 of file ListTag.php.
pocketmine\nbt\tag\ListTag::getType | ( | ) |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 199 of file ListTag.php.
|
protected |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 195 of file ListTag.php.
pocketmine\nbt\tag\ListTag::getValue | ( | ) |
pocketmine\nbt\tag\ListTag::insert | ( | int | $offset, |
Tag | $tag | ||
) |
Inserts a tag into the list between existing tags, at the specified offset. Later values in the list are moved up by 1 position.
OutOfRangeException if the offset is not within the bounds of the list
Definition at line 133 of file ListTag.php.
pocketmine\nbt\tag\ListTag::isset | ( | int | $offset | ) |
Returns whether a tag exists at the specified offset.
Definition at line 184 of file ListTag.php.
pocketmine\nbt\tag\ListTag::last | ( | ) |
Returns the element in the last position in the list (the end), without removing it.
Definition at line 167 of file ListTag.php.
|
protected |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 291 of file ListTag.php.
pocketmine\nbt\tag\ListTag::pop | ( | ) |
Removes the last tag from the list and returns it.
Definition at line 107 of file ListTag.php.
pocketmine\nbt\tag\ListTag::push | ( | Tag | $tag | ) |
Appends the specified tag to the end of the list.
Definition at line 99 of file ListTag.php.
Referenced by pocketmine\nbt\tag\ListTag\__construct().
|
static |
Definition at line 241 of file ListTag.php.
pocketmine\nbt\tag\ListTag::remove | ( | int | $offset | ) |
Removes a value from the list. All later tags in the list are moved down by 1 position.
Definition at line 141 of file ListTag.php.
|
staticprotectedinherited |
|
inherited |
pocketmine\nbt\tag\ListTag::set | ( | int | $offset, |
Tag | $tag | ||
) |
Overwrites the tag at the specified offset.
OutOfRangeException if the offset is not within the bounds of the list
Definition at line 176 of file ListTag.php.
pocketmine\nbt\tag\ListTag::setTagType | ( | int | $type | ) |
Sets the type of tag that can be added to this list. If TAG_End is used, the type will be auto-detected from the first tag added to the list.
LogicException if the list is not empty
Definition at line 217 of file ListTag.php.
pocketmine\nbt\tag\ListTag::shift | ( | ) |
Removes the first tag from the list and returns it.
Definition at line 122 of file ListTag.php.
|
protected |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 271 of file ListTag.php.
|
finalinherited |
pocketmine\nbt\tag\ListTag::unshift | ( | Tag | $tag | ) |
Adds the specified tag to the start of the list.
Definition at line 114 of file ListTag.php.
pocketmine\nbt\tag\ListTag::write | ( | NbtStreamWriter | $writer | ) |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 262 of file ListTag.php.