diff --git a/src/ChestShop/ChestShop.php b/src/ChestShop/ChestShop.php index bcf4976..101e2b1 100644 --- a/src/ChestShop/ChestShop.php +++ b/src/ChestShop/ChestShop.php @@ -22,6 +22,8 @@ public function onCommand(CommandSender $sender, Command $command, string $label switch ($command->getName()) { case "id": $name = array_shift($args); + if(empty($name)) + return false; $constants = array_keys((new \ReflectionClass(ItemIds::class))->getConstants()); foreach ($constants as $constant) { if (stripos($constant, $name) !== false) {