In your onCommand function: PHP: $sender->getInventory()->getItemInHand()->addEnchantment(Enchantment::getEnchantment(Enchantment::SPEED));