Examples of events()


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

    action.put("target", "player1");
    action.put("args", "player2");
    assertTrue(CommandCenter.execute(admin, action));
    assertEquals(
        "You have successfully married \"player1\" and \"player2\".",
        admin.events().get(0).get("text"));
    admin.clearEvents();

    assertTrue(CommandCenter.execute(admin, action));
    assertEquals(
        "player1 is already married to player2. player2 is already married to player1.",
View Full Code Here

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

    admin.clearEvents();

    assertTrue(CommandCenter.execute(admin, action));
    assertEquals(
        "player1 is already married to player2. player2 is already married to player1.",
        admin.events().get(0).get("text"));
    admin.clearEvents();
  }
}
View Full Code Here

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

    RPAction action = new RPAction();
    action.put("type", "jail");

    CommandCenter.execute(player, action);
    assertEquals("Usage: /jail <name> <minutes> <reason>", player.events().get(0).get("text"));

    if (!DAORegister.get().get(CharacterDAO.class).hasCharacter("offlineplayer")) {
      RPObject rpobject = new RPObject();
      rpobject.setRPClass("player");
      rpobject.put("name", "offlineplayer");
View Full Code Here

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

    action.put("target", "offlineplayer");
    action.put("reason", "whynot");
    action.put("minutes", 1);

    CommandCenter.execute(player, action);
    assertEquals("You have jailed offlineplayer for 1 minutes. Reason: whynot.", player.events().get(0).get("text"));
    assertEquals("JailKeeper asks for support to ADMIN: hugo jailed offlineplayer for 1 minutes. Reason: whynot.", player.events().get(1).get("text"));
    assertEquals("Player offlineplayer is not online, but the arrest warrant has been recorded anyway.", player.events().get(2).get("text"));
    player.clearEvents();

View Full Code Here

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

    action.put("reason", "whynot");
    action.put("minutes", 1);

    CommandCenter.execute(player, action);
    assertEquals("You have jailed offlineplayer for 1 minutes. Reason: whynot.", player.events().get(0).get("text"));
    assertEquals("JailKeeper asks for support to ADMIN: hugo jailed offlineplayer for 1 minutes. Reason: whynot.", player.events().get(1).get("text"));
    assertEquals("Player offlineplayer is not online, but the arrest warrant has been recorded anyway.", player.events().get(2).get("text"));
    player.clearEvents();


    player.clearEvents();
View Full Code Here

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

    action.put("minutes", 1);

    CommandCenter.execute(player, action);
    assertEquals("You have jailed offlineplayer for 1 minutes. Reason: whynot.", player.events().get(0).get("text"));
    assertEquals("JailKeeper asks for support to ADMIN: hugo jailed offlineplayer for 1 minutes. Reason: whynot.", player.events().get(1).get("text"));
    assertEquals("Player offlineplayer is not online, but the arrest warrant has been recorded anyway.", player.events().get(2).get("text"));
    player.clearEvents();


    player.clearEvents();
    action = new RPAction();
View Full Code Here

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

    action.put("target", "notexistingplayerxckjvhyxkjcvhyxkjvchk");
    action.put("reason", "whynot");
    action.put("minutes", 1);

    CommandCenter.execute(player, action);
    assertEquals("No character with that name: notexistingplayerxckjvhyxkjcvhyxkjvchk", player.events().get(0).get("text"));
    player.clearEvents();


    MockStendhalRPRuleProcessor.get().addPlayer(player);
    action = new RPAction();
View Full Code Here

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

    action.put("target", "hugo");
    action.put("reason", "whynot");
    action.put("minutes", "noNumber");

    CommandCenter.execute(player, action);
    assertEquals("Usage: /jail <name> <minutes> <reason>", player.events().get(0).get("text"));
    player.clearEvents();

   
    action = new RPAction();
    action.put("type", "jail");
View Full Code Here

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

    action.put("target", "hugo");
    action.put("reason", "whynot");
    action.put("minutes", 1);

    assertTrue(CommandCenter.execute(player, action));
    assertThat(player.events().get(0).get("text"), startsWith("You have been jailed for 1 minutes. Reason: whynot."));
  }

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

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

    RPAction action = new RPAction();
    action.put("type", "gag");

    CommandCenter.execute(pl, action);

    assertEquals("Usage: /gag name minutes reason", pl.events().get(0).get("text"));
    pl.clearEvents();
    action = new RPAction();
    action.put("type", "gag");
    action.put("target", "name");
    action.put("reason", "whynot");
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.