Examples of events()


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

    pl.setAdminLevel(5000);
    final RPAction action = new RPAction();
    action.put("type", "tellall");
    action.put("text", "huhu");
    CommandCenter.execute(pl, action);
    assertEquals("Administrator SHOUTS: huhu", pl.events().get(0).get("text"));
 
  }

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

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

    action.put("type", "supportanswer");
    action.put("text", "huhu");
    action.put("target", "bob");
    CommandCenter.execute(pl, action);
    assertEquals("Support (player) tells you: huhu \nIf you wish to reply, use /support.", bob.events().get(0).get("text"));
    assertEquals("player answers bob's support question: huhu", anptherAdmin.events().get(0).get("text"));

    bob.clearEvents();
    pl.clearEvents();
    pl.setAdminLevel(0);
    assertEquals("0", pl.get("adminlevel"));
View Full Code Here

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

    pl.setAdminLevel(5000);
    final RPAction action = new RPAction();
    action.put("type", "teleportto");
    action.put("target", "blah");
    CommandCenter.execute(pl, action);
    assertEquals("Player \"blah\" not found", pl.events().get(0).get("text"));
  }

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

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

    zone.add(pl);
    final RPAction action = new RPAction();
    action.put("type", "teleportto");
    action.put("target", "blah");
    CommandCenter.execute(pl, action);
    assertEquals("Position [0,0] is occupied", pl.events().get(0).get("text"));
  }

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

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

    action.put("value", 0);

    CommandCenter.execute(pl, action);
    assertEquals(
        "Attribute you are altering is not defined in RPClass(player)",
        pl.events().get(0).get("text"));
  }

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

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

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

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

    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"));
  }

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

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

    action.put("stat", "title");
    action.put("mode", "");
    action.put("value", 0);

    CommandCenter.execute(pl, action);
    assertEquals("The title attribute may not be changed directly.", pl
        .events().get(0).get("text"));
  }

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

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

    action.put("type", "altercreature");
    action.put("target", "bob");
    action.put("text", "blabla");

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

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

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

    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");
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.