mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-04 08:56:15 +00:00
Add missing setValue() override to LongTag
why did this take two commits ;-;
This commit is contained in:
@ -57,4 +57,16 @@ class LongTag extends NamedTag{
|
|||||||
public function &getValue() : int{
|
public function &getValue() : int{
|
||||||
return parent::getValue();
|
return parent::getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param int $value
|
||||||
|
*
|
||||||
|
* @throws \TypeError
|
||||||
|
*/
|
||||||
|
public function setValue($value) : void{
|
||||||
|
if(!is_int($value)){
|
||||||
|
throw new \TypeError("LongTag value must be of type int, " . gettype($value) . " given");
|
||||||
|
}
|
||||||
|
parent::setValue($value);
|
||||||
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user