mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
EffectCommand: restrict range of values for duration, fixes #2055
This commit is contained in:
parent
773f760fff
commit
d53258c943
@ -80,7 +80,10 @@ class EffectCommand extends VanillaCommand{
|
|||||||
$amplification = 0;
|
$amplification = 0;
|
||||||
|
|
||||||
if(count($args) >= 3){
|
if(count($args) >= 3){
|
||||||
$duration = ((int) $args[2]) * 20; //ticks
|
if(($d = $this->getBoundedInt($sender, $args[2], 0, INT32_MAX)) === null){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$duration = $d * 20; //ticks
|
||||||
}else{
|
}else{
|
||||||
$duration = null;
|
$duration = null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user