Package org.groovymud.object

Examples of org.groovymud.object.Container


  }

  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) {
View Full Code Here


    Set<MudObject> mos = getMudObjects();
    synchronized (mos) {
      for (MudObject mudObject : mos) {

        if (mudObject instanceof Container) {
          Container container = castToContainer(mudObject);
          container.getInventoryHandler().relinkContent(container);
        }

        mudObject.setCurrentContainer(obj); // relink container data
        mudObject.addObserver(obj);
        getRegistry().addMudObject(mudObject); // re-register contents
View Full Code Here

      final ArgHolder argHolder = new ArgHolder();

      argHolder.parse(nextCommand, player);

      Container container = player.getCurrentContainer();
      boolean commandRun = false;
      MudObject containerMO = (MudObject) container;
      if (containerMO != null) {
        // the object means to do the action with the container, it
        // holds a list of
View Full Code Here

      final ArgHolder argHolder = new ArgHolder();

      argHolder.parse(nextCommand, player);

      Container container = player.getCurrentContainer();
      boolean commandRun = false;
      MudObject containerMO = (MudObject) container;
      if (containerMO != null) {
        // the object means to do the action with the container, it
        // holds a list of
View Full Code Here

  protected File createFile(String username) {
    return new File(mudSpacePlayerLocation + username + ".xml");
  }

  public void movePlayerToLocation(Player player) throws InstantiationException, FileNotFoundException, CompilationFailedException {
    Container room;
    ObjectLocation location = player.getContainerLocation();

    room = (Container) getObjectRegistry().getMudObject(location.getBeanId());
    if (room == null) {
      room = (Container) load(location);
    }
    if (room == null) {
      throw new InstantiationException("room was null!");
    }
    room.addMudObject(player);
  }
View Full Code Here

TOP

Related Classes of org.groovymud.object.Container

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.