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