mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Liquid: added missing bounds check for setDecay()
This commit is contained in:
parent
7a75fcda44
commit
e9a6c0ba58
@ -83,6 +83,9 @@ abstract class Liquid extends Transparent{
|
||||
|
||||
/** @return $this */
|
||||
public function setDecay(int $decay) : self{
|
||||
if($decay < 0 || $decay > 7){
|
||||
throw new \InvalidArgumentException("Decay must be in range 0-7");
|
||||
}
|
||||
$this->decay = $decay;
|
||||
return $this;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user