This is my Code: <?php namespace blue; use pocketmine\plugin\PluginBase; use pocketmine\Player; use pocketmine\Server; use pocketmine\event\Listener; use pocketmine\event\player\PlayerJoinEvent; use pocketmine\command\Command; use pocketmine\command\CommandSender; use pocketmine\item\Item; use pocketmine\event\block\BlockPlaceEvent; use pocketmine\item\enchantment\Enchantment; use pocketmine\item\enchantment\EnchantmentInstance; use pocketmine\entity\Effect; use pocketmine\event\entity\EntityDamageEvent; use pocketmine\block\Block; use pocketmine\math\Vector3; use pocketmine\level\particle\DestroyBlockParticle; use pocketmine\level\particle\{DustParticle, FlameParticle, FloatingTextParticle, EntityFlameParticle, CriticalParticle, ExplodeParticle, HeartParticle, LavaParticle, MobSpawnParticle, SplashParticle}; use pocketmine\event\player\PlayerMoveEvent; class Main extends PluginBase implements Listener { public $plugin; public function onEnable(){ $this->getLogger()->info("Enable"); $this->getServer()->getPluginManager()->registerEvents($this, $this); $this->eco = $this->getServer()->getPluginManager()->getPlugin("EconomyAPI"); } public function onCommand(CommandSender $sender, Command $command, String $label, array $args) : bool { switch($command->getName()){ case "blue": $sender->removeAllEffects(); $sender->addEffect(Effect::getEffect(10)->setAmplifier(50)->setDuration(20*2)->setVisible(false)); return true; } return true; } } And this is my Problem: [16:53:50] [Server thread/CRITICAL]: Error: "Call to undefined method pocketmine\entity\Effect::setAmplifier()" (EXCEPTION) in "plugins/blue/src/blue/Main" at line 38