Package org.groovymud.object.alive

Examples of org.groovymud.object.alive.Alive


      if (old != null) {
        old.dest(false);
      }
    }
    if (isAliveInstance(obj)) {
      Alive alive = castToAlive(obj);
      if (alive.getTerminalOutput() == null) {
        alive.setTerminalOutput(new LoggingExtendedTerminalIO(null));
        LoggingExtendedTerminalIO io = (LoggingExtendedTerminalIO) alive.getTerminalOutput();
        if (io != null) {
          io.setObject(alive);
        }
      }
    }
View Full Code Here


    ((Observable) player).fireEvent(leaves);
  }

  protected synchronized void findNewContainer(ScopedEvent arg) {
    MovementEvent event = (MovementEvent) arg;
    Alive movingObject = event.getMovingObject();
    Container foundContainer = (Container) getMudObject(event.getRoomLocation().getBeanId());
    if (foundContainer == null) {
      Exception anException = null;
      try {
        foundContainer = (Container) getMudObjectAttendant().load(event.getRoomLocation());
      } catch (CompilationFailedException e) {
        logger.error(e, e);
        anException = e;
      } finally {
        if (anException != null) {
          try {
            movingObject.getTerminalOutput().writeln(anException.getMessage());
          } catch (IOException e) {
            logger.error(e, e);
          }
        }
      }
View Full Code Here

      Container con = castToContainer(obj);
      relinkContent(con);
    }

    if (isAliveInstance(obj)) {
      Alive alive = castToAlive(obj);
      if (alive.getTerminalOutput() == null) {
        alive.setTerminalOutput(new LoggingExtendedTerminalIO(null));
        LoggingExtendedTerminalIO io = (LoggingExtendedTerminalIO) alive.getTerminalOutput();
        if (io != null) {
          io.setObject(alive);
        }
      }
    }
View Full Code Here

    }
  }

  protected synchronized void findNewContainer(ScopedEvent arg) {
    MovementEvent event = (MovementEvent) arg;
    Alive movingObject = event.getMovingObject();
    Exception anException = null;
    Container foundContainer = null;
    try {
      foundContainer = castToContainer(getMudObjectAttendant().findOrClone(event.getRoomLocation()));
    } catch (MudCloneException e) {
      logger.error(e, e);
      anException = e;
    } finally {
      if (anException != null) {
        try {
          movingObject.getTerminalOutput().writeln(anException.getMessage());
        } catch (IOException e) {
          logger.error(e, e);
        }
      }
    }
View Full Code Here

      if (old != null) {
        old.dest(false);
      }
    }
    if (isAliveInstance(obj)) {
      Alive alive = castToAlive(obj);
      if (alive.getTerminalOutput() == null) {
        alive.setTerminalOutput(new LoggingExtendedTerminalIO(null));
        LoggingExtendedTerminalIO io = (LoggingExtendedTerminalIO) alive.getTerminalOutput();
        if (io != null) {
          io.setObject(alive);
        }
      }
    }
View Full Code Here

    while (all.hasNext()) {
      Set<MudObject> nextSet = all.next();
      Iterator<MudObject> setIterator = nextSet.iterator();
      while (setIterator.hasNext()) {
        Alive obj = (Alive) setIterator.next();
        ExtendedTerminalIO term = obj.getTerminalOutput();
        if (term == null) {
          continue;
        }
        if (mEvent.getSource() == obj) {
          try {
View Full Code Here

    ((Observable) player).fireEvent(leaves);
  }

  protected synchronized void doMovementEvent(IScopedEvent arg) {
    MovementEvent event = (MovementEvent) arg;
    Alive movingObject = event.getMovingObject();
    Container foundRoom = (Container) getMudObject(event.getRoomLocation().getBeanId());
    if (foundRoom == null) {
      Exception anException = null;
      try {
        foundRoom = (Container) getMudObjectAttendant().load(event.getRoomLocation());
      } catch (CompilationFailedException e) {
        logger.error(e, e);
        anException = e;
      } finally {
        if (anException != null) {
          try {
            movingObject.getTerminalOutput().writeln(anException.getMessage());
          } catch (IOException e) {
            logger.error(e, e);
          }
        }
      }
View Full Code Here

    while (all.hasNext()) {
      Set<MudObject> nextSet = all.next();
      Iterator<MudObject> setIterator = nextSet.iterator();
      while (setIterator.hasNext()) {
        Alive obj = (Alive) setIterator.next();
        ExtendedTerminalIO term = obj.getTerminalOutput();
        if (term == null) {
          continue;
        }
        if (mEvent.getSource() == obj) {
          try {
View Full Code Here

TOP

Related Classes of org.groovymud.object.alive.Alive

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.