I have problems with this code: PHP: private function getId($name){ if(!$name == ""){ if($this->isItem(ItemFactory::fromString($name)->getId())){ return ItemFactory::fromString($name)->getId(); } } return 0; } Is it somehow possible to check if the String is vaild?
To check if the string maps to a valid item? https://github.com/pmmp/PocketMine-...ine/command/defaults/GiveCommand.php#L64-#L69 You have an issue with !$name == "". It should've been $name != "" (or use parentheses: !($item == "")).