Hello, how sent command from console if player use any item (I know how make it), for example: Player eat stake and command from console /effect $player 1 10 Else how set effect to player?
If you want to run the command from the console run it without a '/' like "effect (Player Name) 1 10"
This us the plugin development forum... -_-# Avoid running commands. Try to use the API instead. https://github.com/PocketMine/PocketMine-MP/blob/master/src/pocketmine/entity/Entity.php#L298
$player->addEffect(Effect::getEffect(Effect::SPEED)); SPEED can be replaced by the constant names here https://github.com/PocketMine/PocketMine-MP/blob/master/src/pocketmine/entity/Effect.php#L31-55
$player->addEffect(Effect::getEffect(Effect::SPEED)->setDuration($ticks)) maybe. That's what I think should be correct so far.