Examples of drop()


Examples of de.fhg.igd.mongomvcc.VDatabase.drop()

    System.out.println("Previously, there were only " + oldPersons.find().size() + " persons");
    Map<String, Object> oldElvis = oldPersons.findOne(factory.createDocument("name", "Elvis"));
    System.out.println("Last year, Elvis was " + oldElvis.get("age") + " years old");
   
    // 7. Drop the database
    db.drop();
  }
}
View Full Code Here

Examples of games.stendhal.server.entity.RPEntity.drop()

  @Override
  public void onDead(final Entity killer, final boolean remove) {
    if (killer instanceof RPEntity) {
      final RPEntity killerRPEntity = (RPEntity) killer;

      if (killerRPEntity.drop(oldItemType)) {
        final Item item = SingletonRepository.getEntityManager().getItem(
            itemType);

        killerRPEntity.equipOrPutOnGround(item);
      }
View Full Code Here

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

      return false;
    }
    if (user instanceof Player) {
      Player player = (Player) user;
      if (player.hasQuest(QUEST)) {
        if (player.drop("money", COST)) {
          player.addEvent(new ViewChangeEvent(x, y));
          return true;
        } else {
          player.sendPrivateText("You do not have enough money.");
        }
View Full Code Here

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

    en.step(player, "bye");
    assertEquals("Bye.", getReply(npc));
    en.step(player, "hi");
    assertEquals("Hey! Is that leather hat for me?", getReply(npc));
    npc.remove("text");
    player.drop("leather helmet");
    int oldXP = player.getXP();
    en.step(player, "yes");
    assertEquals(oldXP, player.getXP());
    assertEquals(null, getReply(npc));
    en.step(player, "bye");
View Full Code Here

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

      itemName = args.get(1);
    }

    final String singularItemName = Grammar.singular(itemName);

    boolean result = player.drop(itemName, amount);

    if (!result && !itemName.equals(singularItemName)) {
      result = player.drop(singularItemName, amount);
    }
View Full Code Here

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

    final String singularItemName = Grammar.singular(itemName);

    boolean result = player.drop(itemName, amount);

    if (!result && !itemName.equals(singularItemName)) {
      result = player.drop(singularItemName, amount);
    }

    final String msg = "Admin " + admin.getName() + " removed " + amount
        + " " + Grammar.plnoun(amount, singularItemName)
        + " from player " + player.getName() + ": #" + result;
View Full Code Here

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

            if ((wife != null)
                && wife.hasQuest(marriage.getQuestSlot())
                && wife.getQuest(marriage.getSpouseQuestSlot()).equals(
                    husband.getName())) {
              if (wife.isEquipped("wedding ring")) {
                wife.drop("wedding ring");
              }
              if (wife.isEquipped("money", 200*wife.getLevel())) {
                wife.drop("money", 200*wife.getLevel());
              } else {
                final int xp = (int) (wife.getXP() * 0.03);
 
View Full Code Here

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

                    husband.getName())) {
              if (wife.isEquipped("wedding ring")) {
                wife.drop("wedding ring");
              }
              if (wife.isEquipped("money", 200*wife.getLevel())) {
                wife.drop("money", 200*wife.getLevel());
              } else {
                final int xp = (int) (wife.getXP() * 0.03);
                wife.subXP(xp);
              }
              wife.removeQuest(marriage.getQuestSlot());
 
View Full Code Here

Examples of java.awt.dnd.DropTarget.drop()

                return masterComponent;
            }
        }};
        Mockito.when(mockDropEvent.getTransferable()).thenReturn(new ViewRoleSelection(mockViews));
       
        target.drop(mockDropEvent);
       
        // Dropping should add the master successfully
        boolean foundMaster = false, foundNonMaster = false;
        for (AbstractComponent child : testComponent.getComponents()) {
            foundMaster    |= child == masterComponent;
View Full Code Here

Examples of java.awt.dnd.DropTargetListener.drop()

        public void drop(DropTargetDropEvent dtde) {
            //notify additionalListeners
            for (int i = 0; i < _additionalListeners.size(); i++) {
                DropTargetListener l = (DropTargetListener) _additionalListeners
                        .elementAt(i);
                l.drop(dtde);
            }
            // Unhighlight the target. Do this first in case
            // errors occur... Don't want to leave highlighting.
            if (_highlighted != null) {
                _highlighter.renderDeselected(_highlightedFigure);
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.