Пример #1
0
 /**
  * Method onPlayerExit.
  *
  * @param player Player
  * @see lineage2.gameserver.listener.actor.player.OnPlayerExitListener#onPlayerExit(Player)
  */
 @Override
 public void onPlayerExit(final Player player) {
   if (player.getBlockCheckerArena() < 0) {
     return;
   }
   _isExit = true;
   player.teleToLocation(-57478, -60367, -2370);
   player.setTransformation(0);
   player.getEffectList().stopAllEffects();
   int arena = player.getBlockCheckerArena();
   int team = HandysBlockCheckerManager.getInstance().getHolder(arena).getPlayerTeam(player);
   HandysBlockCheckerManager.getInstance().removePlayer(player, arena, team);
   player.setTeam(TeamType.NONE);
   player.broadcastCharInfo();
   PcInventory inv = player.getInventory();
   inv.destroyItemByItemId(13787, inv.getCountOf(13787));
   inv.destroyItemByItemId(13788, inv.getCountOf(13788));
 }
Пример #2
0
 /** Method setPlayersBack. */
 private void setPlayersBack() {
   final ExCubeGameEnd end = new ExCubeGameEnd(_isRedWinner);
   for (Player player : _holder.getAllPlayers()) {
     if (player == null) {
       continue;
     }
     player.getEffectList().stopAllEffects();
     player.setTeam(TeamType.NONE);
     player.setBlockCheckerArena(DEFAULT_ARENA);
     PcInventory inv = player.getInventory();
     inv.destroyItemByItemId(13787, inv.getCountOf(13787));
     inv.destroyItemByItemId(13788, inv.getCountOf(13788));
     broadcastRelationChanged(player);
     player.teleToLocation(-57478, -60367, -2370);
     player.sendPacket(end);
     player.broadcastCharInfo();
   }
 }