Examples of sendPrivateText()


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

  public void tryToPoison() {

    final RPEntity entity = getAttackTarget();
    if (poisoner.attack(entity)) {
      new GameEvent(getName(), "poison", entity.getName()).raise();
      entity.sendPrivateText("You have been poisoned by " + Grammar.a_noun(getName()));
    }
  }

  public void equip(final List<EquipItem> items) {
    for (final EquipItem equippedItem : items) {
View Full Code Here

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

      player1.setQuest(SPOUSE, name2);
      player1.sendPrivateText("Congratulations! You are now married to \""
          + name2
          + "\". You can use #/spouse if you want to be together.");
      player2.setQuest(SPOUSE, name1);
      player2.sendPrivateText("Congratulations! You are now married to \""
          + name1
          + "\". You can use #/spouse if you want to be together.");
      text = "You have successfully married \"" + name1 + "\" and \""
          + name2 + "\".";
      new GameEvent(player.getName(), "marry",  name1 + " + " + name2).raise();
View Full Code Here

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

        if (placePet(zone, player, sheep)) {
          player.setSheep(sheep);
          sheep.setOwner(player);
        } else {
          // Didn't fit?
          player.sendPrivateText("You seemed to have lost your sheep while trying to squeeze in.");
        }
      }

      if (pet != null) {
        if (placePet(zone, player, pet)) {
View Full Code Here

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

        if (placePet(zone, player, pet)) {
          player.setPet(pet);
          pet.setOwner(player);
        } else {
          // Didn't fit?
          player.sendPrivateText("You seemed to have lost your pet while trying to squeeze in.");
        }
      }

      if (zoneChanged) {
        /*
 
View Full Code Here

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

 
  public void onTurnReached(final int currentTurn) {
    final String playername = player.getName();
    final Player playerNow = SingletonRepository.getRuleProcessor().getPlayer(playername);
    if (playerNow != null) {
      playerNow.sendPrivateText(source + " tells you:\n" + message);
    } else {
      DBCommandQueue.get().enqueue(new StoreMessageCommand(source, playername, message, "N"));
    }
  }
}
View Full Code Here

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

  public void sendGroupMessage(String name, String text) {
    StendhalRPRuleProcessor ruleProcessor = SingletonRepository.getRuleProcessor();
    for (String playerName : membersAndLastSeen.keySet()) {
      Player player = ruleProcessor.getPlayer(playerName);
      if (player != null) {
        player.sendPrivateText(NotificationType.GROUP, name + ": " + text);
      }
    }
  }

View Full Code Here

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

          + " support question: " + reply;

      new GameEvent(player.getName(), SUPPORTANSWER, action.get(TARGET), reply).raise();
      if (supported != null) {

        supported.sendPrivateText(NotificationType.SUPPORT, "Support (" + player.getTitle() + ") tells you: " + reply + " \nIf you wish to reply, use /support.");
        supported.notifyWorldAboutChanges();
        SingletonRepository.getRuleProcessor().sendMessageToSupporters(message);
       
      } else {
        // that player is not logged in. Do they exist at all or are they just offline? Try sending a message with postman.
View Full Code Here

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

    final Player admin = SingletonRepository.getRuleProcessor().getPlayer(adminName);
   
    if(!characterExists) {
        if (admin != null) {
          // incase admin logged out while waiting we want to avoid NPE
          admin.sendPrivateText(NotificationType.ERROR, "Sorry, " + target + " could not be found.");
        }
        return;
    }
   
    final String message = adminName + " answers " + Grammar.suffix_s(target)
View Full Code Here

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


    if (sourceplayer != null) {
      // incase source player logged out while waiting we want to avoid NPE
      if(characterExists) {
        sourceplayer.sendPrivateText("postman tells you: Message accepted for delivery");
      } else {
        sourceplayer.sendPrivateText(NotificationType.ERROR, "postman tells you: Sorry, " + target + " could not be found, so your message cannot be stored.");
      }
      sourceplayer.setLastPrivateChatter("postman");
    }
View Full Code Here

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

    if (sourceplayer != null) {
      // incase source player logged out while waiting we want to avoid NPE
      if(characterExists) {
        sourceplayer.sendPrivateText("postman tells you: Message accepted for delivery");
      } else {
        sourceplayer.sendPrivateText(NotificationType.ERROR, "postman tells you: Sorry, " + target + " could not be found, so your message cannot be stored.");
      }
      sourceplayer.setLastPrivateChatter("postman");
    }
   
    return;
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.