Examples of clearEvents()


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

    assertTrue(CommandCenter.execute(pl, action));
    replies = getAllPrivateReplies(pl);
    assertEquals(2, replies.size());
    assertEquals("Trying to cast a spell...", replies.get(0));
    assertEquals("Your stats have been raised.", replies.get(1));
    pl.clearEvents();
    assertEquals(44950, pl.getXP());
    assertEquals(17, pl.getLevel());
    assertEquals(24, pl.getDef());
    assertEquals(24720, pl.getAtkXP());
    assertEquals(24, pl.getAtk());
View Full Code Here

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

    assertTrue(AdministrationAction.isPlayerAllowedToExecuteAdminCommand(
        pl, "", true));
    assertTrue(AdministrationAction.isPlayerAllowedToExecuteAdminCommand(
        pl, "adminlevel", true));
    pl.setAdminLevel(50);
    pl.clearEvents();
    assertEquals(true, AdministrationAction
        .isPlayerAllowedToExecuteAdminCommand(pl, "adminlevel", true));
    assertEquals(true,
        AdministrationAction.isPlayerAllowedToExecuteAdminCommand(pl,
            "supportanswer", true));
View Full Code Here

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

    MockStendhalRPRuleProcessor.get().addPlayer(pl);

    CommandCenter.execute(pl, new RPAction());
    assertEquals("Unknown command null. Please type /help to get a list.", pl.events().get(0).get("text"));

    pl.clearEvents();
    pl.setAdminLevel(5000);
    final RPAction action = new RPAction();
    action.put("type", "tellall");
    action.put("text", "huhu");
    CommandCenter.execute(pl, action);
View Full Code Here

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

    action.put("value", 0);

    CommandCenter.execute(pl, action);
    assertEquals("Sorry, name cannot be changed.", pl.events().get(0).get("text"));
    action.put("stat", "adminlevel");
    pl.clearEvents();
    CommandCenter.execute(pl, action);
    assertEquals(
        "Use #/adminlevel #<playername> #[<newlevel>] to display or change adminlevel.",
        pl.events().get(0).get("text"));
  }
View Full Code Here

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

    RPAction action = new RPAction();
    action.put("type", "marry");
    assertTrue(CommandCenter.execute(admin, action));
    assertEquals("Usage: #/marry #<player1> #<player2>",
        admin.events().get(0).get("text"));
    admin.clearEvents();

    action = new RPAction();
    action.put("type", "marry");
    action.put("target", "player1");
    action.put("args", "player2");
View Full Code Here

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

    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.",
        admin.events().get(0).get("text"));
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.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.clearEvents()

      rpobject.setRPClass("player");
      rpobject.put("name", "offlineplayer");
      DAORegister.get().get(CharacterDAO.class).addCharacter("offlineplayer", "offlineplayer", rpobject);
    }

    player.clearEvents();
    action = new RPAction();
    action.put("type", "jail");
    action.put("target", "offlineplayer");
    action.put("reason", "whynot");
    action.put("minutes", 1);
View Full Code Here

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

    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();
    action.put("type", "jail");
View Full Code Here

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

    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();
    action.put("type", "jail");
    action.put("target", "notexistingplayerxckjvhyxkjcvhyxkjvchk");
    action.put("reason", "whynot");
    action.put("minutes", 1);
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.