Esempio n. 1
0
 private void performMatchAction(ArenaPlayer player) {
   BAExecutor executor = BattleArena.getBAExecutor();
   String args[];
   switch (command) {
     case JOIN:
       args = new String[] {"join", options1};
       executor.join(player, mp, args, true);
       break;
     case LEAVE:
       args = new String[] {"leave", options1, options2};
       executor.leave(player, mp, true);
       break;
     case START:
       break;
   }
 }
Esempio n. 2
0
  public void testQueue() {
    MatchParams mp = loadParams("Arena");
    Player p1 = new TestBukkitPlayer("p1");
    Player p2 = new TestBukkitPlayer("p2");
    ArenaPlayer ap1 = BattleArena.toArenaPlayer(p1);
    ArenaPlayer ap2 = BattleArena.toArenaPlayer(p2);
    String[] args = new String[] {""};

    BAExecutor exec = new BAExecutor();
    exec.join(ap1, mp, args);
    exec.join(ap2, mp, args);
    for (MatchParams params : ParamController.getAllParams()) {
      System.out.println("param  =  " + params);
    }
    delay(50);
    assertTrue(bac.isInQue(ap1));
  }