mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-09 23:39:43 +00:00
Item: make __toString() use base64 for displaying NBT
This commit is contained in:
parent
1c79d43d88
commit
abbdd7efdd
@ -841,7 +841,7 @@ class Item implements ItemIds, \JsonSerializable{
|
|||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
final public function __toString() : string{
|
final public function __toString() : string{
|
||||||
return "Item " . $this->name . " (" . $this->id . ":" . ($this->hasAnyDamageValue() ? "?" : $this->getMeta()) . ")x" . $this->count . ($this->hasNamedTag() ? " tags:0x" . self::writeCompoundTag($this->nbt) : "");
|
return "Item " . $this->name . " (" . $this->id . ":" . ($this->hasAnyDamageValue() ? "?" : $this->getMeta()) . ")x" . $this->count . ($this->hasNamedTag() ? " tags:" . base64_encode(self::writeCompoundTag($this->nbt)) : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user