Package org.moparscape.msc.gs.event

Examples of org.moparscape.msc.gs.event.SingleEvent


    }

  }

  public void waitAndDrop(final Player player, final InvItem item) {
    Instance.getDelayedEventHandler().add(new SingleEvent(player, 500) {

      @Override
      public void action() {

        if (owner.dropTickCount > 20) { // 10 seconds they are allowed
View Full Code Here


  /**
   * Adds a DelayedEvent that will spawn a GameObject
   */
  public void delayedSpawnObject(final GameObjectLoc loc,
      final int respawnTime) {
    delayedEventHandler.add(new SingleEvent(null, respawnTime) {

      public void action() {
        registerGameObject(new GameObject(loc));
      }
    });
View Full Code Here

        val = connections.get(a.getAddress().getHostAddress());
      }
      if (val != null) {
        if (Config.DELAY_REMOVAL > 0) {
          Instance.getDelayedEventHandler().add(
              new SingleEvent(null, Config.DELAY_REMOVAL) {
                public void action() {
                  unblock(a);
                }
              });
        } else {
View Full Code Here

        player.setFollowing(affectedPlayer);
        WalkToMobEvent walking = new WalkToMobEvent(player,
            affectedPlayer, 1) {
          public void arrived() {
            Instance.getDelayedEventHandler().add(
                new SingleEvent(owner, 300) {
                  public void action() {
                    Player affectedPlayer = (Player) affectedMob;
                    owner.resetPath();
                    if (!owner.nextTo(affectedPlayer)) {
                      unsetOptions(owner);
View Full Code Here

   */
  public boolean shutdownForUpdate() {
    if (updateEvent != null) {
      return false;
    }
    updateEvent = new SingleEvent(null, 59000) {
      public void action() {
        kill();
      }
    };
    Instance.getDelayedEventHandler().add(updateEvent);
View Full Code Here

          newHp = player.getMaxStat(3);
        }
        player.setCurStat(3, newHp);
        player.getActionSender().sendStat(3);
      }
      Instance.getDelayedEventHandler().add(new SingleEvent(player, 185) {
        public void action() {
          if (heals) {
            owner.getActionSender().sendMessage(
                "It heals some health.");
          }
View Full Code Here

TOP

Related Classes of org.moparscape.msc.gs.event.SingleEvent

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.