<?php namespace ASETeleport; use pocketmine\plugin\PluginBase; use pocketmine\utils\TextFormat; use pocketmine\Player; use pocketmine\command\CommandSender; use pocketmine\command\Command; use pocketmine\event\entity\ProjectileHitEvent; use pocketmine\event\Listener; use pocketmine\event\player\PlayerChatEvent; use pocketmine\event\player\PlayerInteractEvent; class Main extends PluginBase implements Listener { public function onEnable(){ $this->getLogger()->info("Das Plugin ASETeleport läuft ohne Probleme!"); } public function onDisable(){ $this->getLogger()->info("Das Plugin ASETeleport hat wohl einen Fehler!"); } public function onTeleport(ProjectileHitEvent $event){ $arrow = $event->getEntity(); if($arrow instanceof Arrow){ foreach($arrow->getViewers() as $player){ if($player instanceof Player){ $player->teleport(new Position($arrow->getX(), $arrow->getY(), $arrow->getZ())); $player->sendMessage(TextFormat::GREEN."Deine Position wurde verändert"); } } } } } ?>
You have to register the events in onEnable(). PHP: $this->getServer()->getPluginManager()->registerEvents($this, $this);
may there is no error message on console, but your event function may not working before you add registerEvents()
Also, since I speak German: PHP: public function onDisable(){$this->getLogger()->info("Das Plugin ASETeleport hat wohl einen Fehler!");} You're saying that it has got an error here, but this is called when the server stops, not when the plugin has got an error.
And please do not develop plugins on mobile/small viewports. You need some oversight. Cropped lines are the root of many mistakes.
Off-topic: make font smaller and turn phone horizontally I developed many plugins on phone when I didn't had this laptop yet.