From 2b24f2d9cf80d30d44ae588f223f90dd132cee38 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Fri, 19 Jul 2019 10:40:23 -0400 Subject: [PATCH] Fix #10 --- src/ChestShop/ChestShop.php | 2 ++ 1 file changed, 2 insertions(+) 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) {