diff --git a/src/pocketmine/command/defaults/EffectCommand.php b/src/pocketmine/command/defaults/EffectCommand.php index 60fb6972d..732b5713b 100644 --- a/src/pocketmine/command/defaults/EffectCommand.php +++ b/src/pocketmine/command/defaults/EffectCommand.php @@ -80,7 +80,10 @@ class EffectCommand extends VanillaCommand{ $amplification = 0; 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{ $duration = null; }