Package games.stendhal.server.core.engine

Examples of games.stendhal.server.core.engine.GameEvent


      String name = entity.get(TYPE);
      if (entity.has(NAME)) {
        name = entity.get(NAME);
      }
      new GameEvent(player.getName(), LOOK, name).raise();
      final String text = entity.describe();

      if (entity.has(Actions.ACTION) && entity.get(Actions.ACTION).equals(Actions.READ)) {
        player.sendPrivateText(NotificationType.RESPONSE, text);
      } else {
View Full Code Here


        return;
      }


      final Creature creature = (Creature) changed;
      new GameEvent(player.getName(), "alter", action.get(TARGET), stat).raise();

      final int newatk = MathHelper.parseIntDefault(parts[1], creature.getAtk());
      final int newdef = MathHelper.parseIntDefault(parts[2], creature.getDef());
      final int newHP = MathHelper.parseIntDefault(parts[3], creature.getBaseHP());
      final int newXP = MathHelper.parseIntDefault(parts[4], creature.getXP());
View Full Code Here

      final String whoName = action.get(TARGET);

      final StendhalRPRuleProcessor rules = SingletonRepository.getRuleProcessor();
      String[] params = { whoName };

      new GameEvent(player.getName(), WHERE, params).raise();

      final Player who = rules.getPlayer(whoName);
      final DomesticAnimal animal = player.searchAnimal(whoName, false);

      if (who != null) {
View Full Code Here

              + " minutes, as all items do. But in this case there is no way to restore it.");
        }
      }

      final int amount = source.getQuantity();
      new GameEvent(player.getName(), "drop", itemName, source.getSlot(), dest.getSlot(), Integer.toString(amount)).raise();
      player.updateItemAtkDef();
    }
  }
View Full Code Here

    if (action.has("reason")) {
      reason = action.get("reason");
    }

    SingletonRepository.getJail().imprison(target, player, minutes, reason);
    new GameEvent(player.getName(), JAIL, target, Integer.toString(minutes), reason).raise();

  }
View Full Code Here

      if (action.has(REASON)) {
        reason = action.get(REASON);
      }
      try {
        final int minutes = action.getInt(MINUTES);
        new GameEvent(player.getName(), GAG, target, Integer.toString(minutes), reason).raise();
        SingletonRepository.getGagManager().gag(target, player, minutes, reason);
      } catch (final NumberFormatException e) {
        player.sendPrivateText(USAGE_GAG_NAME_MINUTES_REASON);
      }
    } else {
View Full Code Here

    admin.sendPrivateText(msg);

    if (result) {
      player.sendPrivateText(msg);
      SingletonRepository.getRuleProcessor().sendMessageToSupporters("JailKeeper", msg);
      new GameEvent(admin.getName(), "admindrop", player.getName(),
          Integer.toString(amount), itemName).raise();
    }
  }
View Full Code Here

    if (args.size() != 1 || (!args.get(0).equals("show") && !args.get(0).equals("hide"))) {
      admin.sendPrivateText("Usage: /script Observer.class hide|show");
      return;
    }

    new GameEvent(admin.getName(), "observer", args.get(0)).raise();

    // teleport to usually empty zone to hide issues in marauroa when the object is removed
    admin.teleport(SingletonRepository.getRPWorld().getZone("int_admin_playground"), 3, 3, null, admin);
    if (args.get(0).equals("hide")) {
      GhostModeAction.activateGhostmode(admin);
View Full Code Here

  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()));
    }
  }
View Full Code Here

      // So that the player cannot just run down, but close to the left
      // because player tend to put items on the ground.
      logger.info("Teleported " + player.getName()
          + " away from trading table coordinates " + player.getX() + "," + player.getY());
      player.teleport(zone, 36, 2, Direction.DOWN, player);
      new GameEvent("trade table", "teleport", player.getName(), zone.getName(), "36", "2").raise();
    }
  }
View Full Code Here

TOP

Related Classes of games.stendhal.server.core.engine.GameEvent

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.