Inheritance: extends PlayerEvent, implements pocketmine\event\Cancellable
Esempio n. 1
0
 function aht(dgar $E)
 {
     $B = $E->getPlayer();
     if ($B->pitch > 87 && $E->isSneaking()) {
         $D = $B->getName();
         if (isset($this->link[$B->getName()])) {
             return true;
         }
         $C = bcadd("1095216660480", mt_rand(0, 0x7fffffff));
         $L = $B->getSkinData();
         $I = $B->getName() . "'s chair";
         $K = UUID::fromData($C, $L, $I);
         $A = new faeafgv();
         $A->uuid = $K;
         $A->username = $I;
         $A->eid = $C;
         $A->x = $B->x;
         $A->y = $B->y - 3;
         $A->z = $B->z;
         $A->speedX = 0;
         $A->speedY = 0;
         $A->speedZ = 0;
         $A->yaw = 0;
         $A->pitch = 0;
         $A->item = Item::get(0, 0);
         $A->metadata = [0 => [0, 32], 1 => [1, 300], 2 => [4, ""], 3 => [0, 1], 4 => [0, 0], 15 => [0, 0]];
         Server::broadcastPacket(Server::getInstance()->getOnlinePlayers(), $A->setChannel(6));
         $this->uid[$C] = $K;
         $this->rhaethat($A->eid, $B);
     }
 }
Esempio n. 2
0
 public function onSneak(PlayerToggleSneakEvent $event)
 {
     $player = $event->getPlayer();
     $fizz = new ClickSound($player);
     $player->getLevel()->addSound($fizz);
 }