Examples of events()


Examples of games.stendhal.server.entity.player.Player.events()

    player.clearEvents();

    player.setAdminLevel(AdministrationAction.getLevelForCommand("ghostmode"));
    player.setGhost(true);
    pq.onAction(player, action);
    assertThat(player.events().get(0).get("text"), equalTo("1 Players online: player(!0) "));
    player.clearEvents();
   
    player.setAdminLevel(AdministrationAction.getLevelForCommand("ghostmode") + 1);
    player.setGhost(true);
    pq.onAction(player, action);
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.events()

    final RPAction action = new RPAction();
    action.put("type", "destroy");
    action.put("target", "#1");

    assertTrue(CommandCenter.execute(pl, action));
    assertEquals("Removed rat creature with ID #1", pl.events().get(0).get("text"));
  }

  /**
   * Tests for onInspectRatWithTargetID.
   */
 
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.events()

      admin.clearEvents();
      admin.setAdminLevel(5000);
      assertTrue(CommandCenter.execute(admin , action));
     
      transaction = TransactionPool.get().beginWork();
      System.out.println(admin.events().get(0).toString());
      assertEquals("banned", accountDAO.getAccountStatus(transaction, player.getName()));
      assertEquals("active", accountDAO.getAccountStatus(transaction, admin.getName()));
      assertFalse(admin.events().isEmpty());
      assertThat(admin.events().get(0).toString(), containsString("RPEvent private_text with Attributes of Class(private_text): "));
      assertThat(admin.events().get(0).toString(), containsString("[text=You have banned account bobby (character: bobby) until end of time for: whynot]"));
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.events()

    player.clearEvents();
   
    player.setAdminLevel(AdministrationAction.getLevelForCommand("ghostmode") + 1);
    player.setGhost(true);
    pq.onAction(player, action);
    assertThat(player.events().get(0).get("text"), equalTo("1 Players online: player(!0) "));
  }

}
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.events()

     
      transaction = TransactionPool.get().beginWork();
      System.out.println(admin.events().get(0).toString());
      assertEquals("banned", accountDAO.getAccountStatus(transaction, player.getName()));
      assertEquals("active", accountDAO.getAccountStatus(transaction, admin.getName()));
      assertFalse(admin.events().isEmpty());
      assertThat(admin.events().get(0).toString(), containsString("RPEvent private_text with Attributes of Class(private_text): "));
      assertThat(admin.events().get(0).toString(), containsString("[text=You have banned account bobby (character: bobby) until end of time for: whynot]"));
      assertThat(admin.events().get(0).toString(), containsString("[texttype=PRIVMSG]"));
 
      // just undo the changes so the next test starts clean
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.events()

    final RPAction action = new RPAction();
    action.put("type", "inspect");
    action.put("target", "#1");

    assertTrue(CommandCenter.execute(pl, action));
    assertTrue(pl
        .events().get(0).get("text")
        .startsWith(
            "Inspected creature is called \"rat\" and has the following attributes:"));
  }
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.events()

      transaction = TransactionPool.get().beginWork();
      System.out.println(admin.events().get(0).toString());
      assertEquals("banned", accountDAO.getAccountStatus(transaction, player.getName()));
      assertEquals("active", accountDAO.getAccountStatus(transaction, admin.getName()));
      assertFalse(admin.events().isEmpty());
      assertThat(admin.events().get(0).toString(), containsString("RPEvent private_text with Attributes of Class(private_text): "));
      assertThat(admin.events().get(0).toString(), containsString("[text=You have banned account bobby (character: bobby) until end of time for: whynot]"));
      assertThat(admin.events().get(0).toString(), containsString("[texttype=PRIVMSG]"));
 
      // just undo the changes so the next test starts clean
      TransactionPool.get().rollback(transaction);
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.events()

      System.out.println(admin.events().get(0).toString());
      assertEquals("banned", accountDAO.getAccountStatus(transaction, player.getName()));
      assertEquals("active", accountDAO.getAccountStatus(transaction, admin.getName()));
      assertFalse(admin.events().isEmpty());
      assertThat(admin.events().get(0).toString(), containsString("RPEvent private_text with Attributes of Class(private_text): "));
      assertThat(admin.events().get(0).toString(), containsString("[text=You have banned account bobby (character: bobby) until end of time for: whynot]"));
      assertThat(admin.events().get(0).toString(), containsString("[texttype=PRIVMSG]"));
 
      // just undo the changes so the next test starts clean
      TransactionPool.get().rollback(transaction);
    } catch (Throwable e) {
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.events()

      assertEquals("banned", accountDAO.getAccountStatus(transaction, player.getName()));
      assertEquals("active", accountDAO.getAccountStatus(transaction, admin.getName()));
      assertFalse(admin.events().isEmpty());
      assertThat(admin.events().get(0).toString(), containsString("RPEvent private_text with Attributes of Class(private_text): "));
      assertThat(admin.events().get(0).toString(), containsString("[text=You have banned account bobby (character: bobby) until end of time for: whynot]"));
      assertThat(admin.events().get(0).toString(), containsString("[texttype=PRIVMSG]"));
 
      // just undo the changes so the next test starts clean
      TransactionPool.get().rollback(transaction);
    } catch (Throwable e) {
      TransactionPool.get().rollback(transaction);
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.events()

    action.put("slot", "hugo");
    action.put("item", "hugo");

    CommandCenter.execute(player, action);
    assertEquals("Player \"hugo\" does not have an RPSlot named \"hugo\".",
        player.events().get(0).get("text"));
    player.clearEvents();

    action = new RPAction();
    action.put("type", "summonat");
    action.put("target", "hugo");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.