From d144832928bd06bac025aa77fc0b6d5e0d5eaafb Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 21 Aug 2022 21:19:16 +0100 Subject: [PATCH] GiveCommand: limit max amount in line with vanilla --- src/command/defaults/GiveCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command/defaults/GiveCommand.php b/src/command/defaults/GiveCommand.php index f7d800062..8acd77a3d 100644 --- a/src/command/defaults/GiveCommand.php +++ b/src/command/defaults/GiveCommand.php @@ -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; }