GiveCommand: limit max amount in line with vanilla

This commit is contained in:
Dylan K. Taylor 2022-08-21 21:19:16 +01:00
parent 709a869045
commit d144832928
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -77,7 +77,7 @@ class GiveCommand extends VanillaCommand{
$item->setCount($item->getMaxStackSize());
}else{
//TODO: PHP_INT_MAX is probably a bit too much, but I don't know what the vanilla limit is
$count = $this->getBoundedInt($sender, $args[2], 1, PHP_INT_MAX);
$count = $this->getBoundedInt($sender, $args[2], 1, 32767);
if($count === null){
return true;
}