mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 11:18:52 +00:00
Allow direct property naming on NBT TAG_Compound
This commit is contained in:
parent
3864630bcd
commit
b374783486
@ -31,9 +31,13 @@ class NBTTag_Compound extends NamedNBTTag{
|
|||||||
|
|
||||||
public function __set($name, $value){
|
public function __set($name, $value){
|
||||||
if(isset($this->value[$name])){
|
if(isset($this->value[$name])){
|
||||||
|
if($value instanceof NamedNBTTag and $value->getName() !== "" and $value->getName() !== false){
|
||||||
|
$this->value[$value->getName()]->setValue($value);
|
||||||
|
}else{
|
||||||
$this->value[$name]->setValue($value);
|
$this->value[$name]->setValue($value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function __isset($name){
|
public function __isset($name){
|
||||||
return isset($this->value[$name]);
|
return isset($this->value[$name]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user