Package games.stendhal.server.events

Examples of games.stendhal.server.events.GroupChangeEvent


   * tell the clients about changes in the group
   */
  private void sendGroupChangeEvent() {
    StendhalRPRuleProcessor ruleProcessor = SingletonRepository.getRuleProcessor();
    List<String> members = new LinkedList<String>(membersAndLastSeen.keySet());
    RPEvent event = new GroupChangeEvent(leader, members, lootmode);
    for (String playerName : membersAndLastSeen.keySet()) {
      Player player = ruleProcessor.getPlayer(playerName);
      if (player != null) {
        player.addEvent(event);
      }
View Full Code Here


   *
   * @param player Player
   */
  public void sendGroupChangeEvent(Player player) {
    List<String> members = new LinkedList<String>(membersAndLastSeen.keySet());
    RPEvent event = new GroupChangeEvent(leader, members, lootmode);
    player.addEvent(event);
  }
View Full Code Here

   *
   * @param toRemove players to remove.
   */
  private void sendLeftGroupEvent(Set<String> toRemove) {
    StendhalRPRuleProcessor ruleProcessor = SingletonRepository.getRuleProcessor();
    RPEvent event = new GroupChangeEvent();
    for (String playerName : toRemove) {
      Player player = ruleProcessor.getPlayer(playerName);
      if (player != null) {
        player.addEvent(event);
      }
View Full Code Here

  private void status(Player player) {
    Group group = SingletonRepository.getGroupManager().getGroup(player.getName());
    if (group == null) {
      // Send an empty event if the player is not a group member, and let
      // the client sort out that it was not about parting from a group.
      player.addEvent(new GroupChangeEvent());
      return;
    }

    group.sendGroupChangeEvent(player);
  }
View Full Code Here

TOP

Related Classes of games.stendhal.server.events.GroupChangeEvent

Copyright © 2018 www.massapicom. 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.