diff --git a/src/pocketmine/entity/AttributeMap.php b/src/pocketmine/entity/AttributeMap.php index 930e90c14..73de5cbc9 100644 --- a/src/pocketmine/entity/AttributeMap.php +++ b/src/pocketmine/entity/AttributeMap.php @@ -71,10 +71,13 @@ class AttributeMap implements \ArrayAccess{ } /** - * @param int $offset - * @param float $value + * @param int|null $offset + * @param float $value */ public function offsetSet($offset, $value) : void{ + if($offset === null){ + throw new \InvalidArgumentException("Array push syntax is not supported"); + } $this->attributes[$offset]->setValue($value); }