mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 08:35:20 +00:00
Liquid: added missing bounds check for setDecay()
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user