Пример #1
0
 /**
  * 더미 이벤트 수신 세션을 생성합니다.
  *
  * @param string $username        	
  * @param string $address        	
  * @param number $port        	
  * @return DummyReceiver
  */
 public function openSession($username, $address = "DUMMYPLAYER", $port = 0)
 {
     $player = new DummyReceiver($this, null, $address, $port);
     $player->setName($username);
     $player->setDisplayName($username);
     $player->setNameTagVisible(true);
     $player->setNameTag($username);
     $player->setSkin($this->skin, "dummy");
     $player->doInit();
     $this->sessions->attach($player, $username);
     $this->ackStore[$username] = [];
     $this->replyStore[$username] = [];
     $this->server->addPlayer($username, $player);
     $this->server->addOnlinePlayer($player);
     return $player;
 }