Why is nothing displayed in the chat?

Discussion in 'Plugin Help' started by MrIngo, Nov 1, 2022.

  1. MrIngo

    MrIngo Creeper

    Messages:
    1
    GitHub:
    Mr-Ingo
    <?php

    namespace test;

    use pocketmine\plugin\PluginBase;
    use pocketmine\event\Listener;
    use pocketmine\event\player\PlayerMoveEvent;
    use pocketmine\world\World;
    use pocketmine\math\Vector3;

    class test extends PluginBase implements Listener{
    public function onEnable(): void {
    $this->getLogger()->info('Я запустился!');
    $this->getServer()->getPluginManager()->registerEvents($this, $this);

    }
    public function Tap(PlayerMoveEvent $e, World $w): bool{
    $p = $e->getPlayer();
    $locate = $e->getFrom();
    $ex = $locate->x;
    $ey = $locate->y;
    $ez = $locate->z;
    $ey--;
    $vector = new Vector3($ex, $ey, $ez);
    $block = $w->getBlock($vector);
    $p->SendMessage($block);
    return true;
    }
    }
     
    Last edited: Nov 1, 2022

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.