PocketMine-MP 5.24.1 git-9d6a0cc7385976fb350f6f919ecc5580b508a783
|
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 281 of file ListTag.php.
pocketmine\nbt\tag\ListTag::count | ( | ) |
Definition at line 89 of file ListTag.php.
pocketmine\nbt\tag\ListTag::empty | ( | ) |
Returns whether there are any tags in the list.
Definition at line 192 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 306 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 161 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 151 of file ListTag.php.
pocketmine\nbt\tag\ListTag::getAllValues | ( | ) |
Returns an array of tag values inserted into this list.
Definition at line 80 of file ListTag.php.
pocketmine\nbt\tag\ListTag::getCount | ( | ) |
Definition at line 93 of file ListTag.php.
pocketmine\nbt\tag\ListTag::getIterator | ( | ) |
Definition at line 300 of file ListTag.php.
pocketmine\nbt\tag\ListTag::getTagType | ( | ) |
Returns the type of tag contained in this list.
Definition at line 207 of file ListTag.php.
pocketmine\nbt\tag\ListTag::getType | ( | ) |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 200 of file ListTag.php.
|
protected |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 196 of file ListTag.php.
pocketmine\nbt\tag\ListTag::getValue | ( | ) |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 66 of file ListTag.php.
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 134 of file ListTag.php.
pocketmine\nbt\tag\ListTag::isset | ( | int | $offset | ) |
Returns whether a tag exists at the specified offset.
Definition at line 185 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 168 of file ListTag.php.
|
protected |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 292 of file ListTag.php.
pocketmine\nbt\tag\ListTag::pop | ( | ) |
Removes the last tag from the list and returns it.
Definition at line 108 of file ListTag.php.
pocketmine\nbt\tag\ListTag::push | ( | Tag | $tag | ) |
Appends the specified tag to the end of the list.
Definition at line 100 of file ListTag.php.
Referenced by pocketmine\nbt\tag\ListTag\__construct().
|
static |
Definition at line 242 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 142 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 177 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 218 of file ListTag.php.
pocketmine\nbt\tag\ListTag::shift | ( | ) |
Removes the first tag from the list and returns it.
Definition at line 123 of file ListTag.php.
|
protected |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 272 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 115 of file ListTag.php.
pocketmine\nbt\tag\ListTag::write | ( | NbtStreamWriter | $writer | ) |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 263 of file ListTag.php.