enum($this->goatHornType); } public function getHornType() : GoatHornType{ return $this->goatHornType; } /** * @return $this */ public function setHornType(GoatHornType $type) : self{ $this->goatHornType = $type; return $this; } public function getMaxStackSize() : int{ return 1; } public function getCooldownTicks() : int{ return 140; } public function getCooldownTag() : ?string{ return ItemCooldownTags::GOAT_HORN; } public function canStartUsingItem(Player $player) : bool{ return true; } public function onClickAir(Player $player, Vector3 $directionVector, array &$returnedItems) : ItemUseResult{ $position = $player->getPosition(); $position->getWorld()->addSound($position, new GoatHornSound($this->goatHornType)); return ItemUseResult::SUCCESS; } }