Package org.jpokemon.overworld

Examples of org.jpokemon.overworld.OverworldService


      JSONObject json = new JSONObject();
      json.put("action", "dresser.Dresser:close");
      PlayerManager.pushJson(player, json);

      OverworldService overworldService = (OverworldService) PlayerManager.getService("overworld");

      // This is sort-of a refresh all
      overworldService.teleportPlayer(player, player.getLocation());
    }
    catch (JSONException e) {
    }
  }
View Full Code Here


    return playerNames;
  }

  public static void bootstrapServices() {
    services = new HashMap<String, JPokemonService>();
    services.put("overworld", new OverworldService());
    services.put("lobby", new LobbyService());
    services.put("friends", new FriendsService());
    services.put("party", new PartyService());
  }
View Full Code Here

    this.nextMapId = nextMapId;
  }

  @Override
  public void execute(Player player) throws ServiceException {
    OverworldService overworldService = (OverworldService) PlayerManager.getService("overworld");
    Map nextMap = overworldService.getMap(nextMapId);
    Entity nextDoor = nextMap.getEntity(mapId);
    Location nextLocation = nextDoor.getLocation().clone();
    nextLocation.setWidth(1);
    nextLocation.setHeight(1);
    nextLocation.setDirection("down");

    overworldService.teleportPlayer(player, nextLocation);
  }
View Full Code Here

TOP

Related Classes of org.jpokemon.overworld.OverworldService

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.