PocketMine-MP 5.28.3 git-d5a1007c80fcee27feb2251cf5dcf1ad5a59a85c
|
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 47 of file ListTag.php.
pocketmine\nbt\tag\ListTag::__construct | ( | array | $value = [], |
int | $tagType = NBT::TAG_End ) |
Tag[] | $value |
Definition at line 61 of file ListTag.php.
References pocketmine\nbt\tag\ListTag\push().
pocketmine\nbt\tag\ListTag::__clone | ( | ) |
Definition at line 300 of file ListTag.php.
pocketmine\nbt\tag\ListTag::count | ( | ) |
Definition at line 86 of file ListTag.php.
pocketmine\nbt\tag\ListTag::empty | ( | ) |
Returns whether there are any tags in the list.
Definition at line 213 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 316 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 173 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 163 of file ListTag.php.
pocketmine\nbt\tag\ListTag::getAllValues | ( | ) |
Returns an array of tag values inserted into this list.
Definition at line 82 of file ListTag.php.
pocketmine\nbt\tag\ListTag::getCount | ( | ) |
Definition at line 90 of file ListTag.php.
pocketmine\nbt\tag\ListTag::getIterator | ( | ) |
Definition at line 312 of file ListTag.php.
pocketmine\nbt\tag\ListTag::getTagType | ( | ) |
Returns the type of tag contained in this list.
Definition at line 228 of file ListTag.php.
pocketmine\nbt\tag\ListTag::getType | ( | ) |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 221 of file ListTag.php.
|
protected |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 217 of file ListTag.php.
pocketmine\nbt\tag\ListTag::getValue | ( | ) |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 73 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 137 of file ListTag.php.
pocketmine\nbt\tag\ListTag::isset | ( | int | $offset | ) |
Returns whether a tag exists at the specified offset.
Definition at line 206 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 183 of file ListTag.php.
|
protected |
Reimplemented from pocketmine\nbt\tag\Tag.
Definition at line 304 of file ListTag.php.
pocketmine\nbt\tag\ListTag::pop | ( | ) |
Removes the last tag from the list and returns it.
Definition at line 105 of file ListTag.php.
pocketmine\nbt\tag\ListTag::push | ( | Tag | $tag | ) |
Appends the specified tag to the end of the list.
Definition at line 97 of file ListTag.php.
Referenced by pocketmine\nbt\tag\ListTag\__construct().
|
static |
Definition at line 265 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 151 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 195 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 242 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 292 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 284 of file ListTag.php.