mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Protocol changes for 1.9.0
This commit is contained in:
@ -216,7 +216,7 @@ class Item implements ItemIds, \JsonSerializable{
|
||||
/**
|
||||
* Sets the Item's NBT
|
||||
*
|
||||
* @param CompoundTag|string $tags
|
||||
* @param CompoundTag|string|null $tags
|
||||
*
|
||||
* @return Item
|
||||
*/
|
||||
@ -224,7 +224,7 @@ class Item implements ItemIds, \JsonSerializable{
|
||||
if($tags instanceof CompoundTag){
|
||||
$this->setNamedTag($tags);
|
||||
}else{
|
||||
$this->tags = (string) $tags;
|
||||
$this->tags = $tags === null ? "" : (string) $tags;
|
||||
$this->cachedNBT = null;
|
||||
}
|
||||
|
||||
@ -232,6 +232,9 @@ class Item implements ItemIds, \JsonSerializable{
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated This method returns NBT serialized in a network-dependent format. Prefer use of getNamedTag() instead.
|
||||
* @see Item::getNamedTag()
|
||||
*
|
||||
* Returns the serialized NBT of the Item
|
||||
* @return string
|
||||
*/
|
||||
|
Reference in New Issue
Block a user