示例#1
0
 /**
  * Entering in boat.
  *
  * @param player The player to add.
  */
 private void enterInBoat() {
   player.getTemporaryAttributtes().put("priority1", false);
   player.getTemporaryAttributtes().put("priority2", false);
   if (waitingPlayers.size() > 25) player.getTemporaryAttributtes().put("priority1", true);
   if (waitingPlayers.size() > 50) player.getTemporaryAttributtes().put("priority2", true);
   waitingPlayers.add(player);
   player.setNextWorldTile(new WorldTile(2661, 2639, 0));
   player.getPackets().sendGameMessage("You board the lander.", true);
   sendInterfaces();
   startGame();
 }
示例#2
0
 /** Starting the game and controler. */
 public void startGame() {
   playersInGame.addAll(waitingPlayers);
   waitingPlayers.remove(playersInGame);
   for (Player players : waitingPlayers) {
     if ((Boolean) players.getTemporaryAttributtes().get("priority1"))
       players
           .getPackets()
           .sendGameMessage(
               "You have been given priority level 1 over other players in joining the next game.");
     if ((Boolean) players.getTemporaryAttributtes().get("priority2"))
       players
           .getPackets()
           .sendGameMessage(
               "You have been given priority level 2 over other players in joining the next game.");
   }
   // player.getControllerManager().startControler("PestControler");
 }
示例#3
0
 /**
  * Departure interface.
  *
  * @param player the player to send interface
  */
 private void sendInterfaces() {
   player.getPackets().sendIComponentText(407, 3, "");
   player.getPackets().sendIComponentText(407, 14, "" + waitingPlayers.size());
   player.getPackets().sendIComponentText(407, 16, "" + Integer.toString(player.getPestPoints()));
   player
       .getInterfaceManager()
       .sendTab(player.getInterfaceManager().hasRezizableScreen() ? 10 : 19, 407);
 }
示例#4
0
 /**
  * Leaving the boat.
  *
  * @param player the player to remove.
  */
 private void leaveBoat() {
   if (waitingPlayers.contains(player)) waitingPlayers.remove(player);
   player.closeInterfaces();
   player.setNextWorldTile(OUTSIDE_AREA);
 }