Examples of events()


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

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

    CommandCenter.execute(pl, action);
    assertEquals("Player name not found", pl.events().get(0).get("text"));

    pl.clearEvents();

    MockStendhalRPRuleProcessor.get().addPlayer(pl);
    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(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", "hugo");
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);

    CommandCenter.execute(pl, action);
    assertTrue(pl.events().get(0).get("text").startsWith(
        "You have gagged hugo for 1 minutes. Reason: "));
  }

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

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

    pl.setAdminLevel(5000);
    final RPAction action = new RPAction();
    action.put("type", "destroy");

    CommandCenter.execute(pl, action);
    assertEquals("Entity not found", pl.events().get(0).get("text"));
  }

  /**
   * Tests for onDestroyPlayer.
   */
 
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", "hugo");

    CommandCenter.execute(pl, action);
    assertEquals("You can't remove players", pl.events().get(0).get("text"));
  }

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

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

    final WhoAction pq = new WhoAction();
    final RPAction action = new RPAction();
    action.put(Actions.TYPE, "who");
    final Player player = PlayerTestHelper.createPlayer("player");
    pq.onAction(player, action);
    assertThat(player.events().get(0).get("text"), equalTo("0 Players online: "));
    player.clearEvents();
    MockStendhalRPRuleProcessor.get().addPlayer(player);
    pq.onAction(player, action);
    assertThat(player.events().get(0).get("text"), equalTo("1 Players online: player(0) "));
    player.clearEvents();
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");

    CommandCenter.execute(pl, action);
    assertEquals("You can't remove SpeakerNPCs", pl.events().get(0).get("text"));
  }

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

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

    pq.onAction(player, action);
    assertThat(player.events().get(0).get("text"), equalTo("0 Players online: "));
    player.clearEvents();
    MockStendhalRPRuleProcessor.get().addPlayer(player);
    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");

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

  /**
   * Tests for onDestroyRatWithTargetID.
   */
 
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("0 Players online: "));
    player.clearEvents();

    player.setAdminLevel(AdministrationAction.getLevelForCommand("ghostmode"));
    player.setGhost(true);
    pq.onAction(player, action);
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.