Package amidst.map

Examples of amidst.map.MapObjectPlayer


 
  private void addPlayer(String name, CompoundTag ps) {
    List<Tag> pos = ((ListTag)(ps.getValue().get("Pos"))).getValue();
    double x = (Double)pos.get(0).getValue();
    double z = (Double)pos.get(2).getValue();
    players.add(new MapObjectPlayer(name, (int) x, (int) z));
  }
View Full Code Here


            public void actionPerformed(ActionEvent arg0) {
              if (window.curProject.saveLoaded) {
                List<MapObjectPlayer> playerList = window.curProject.save.getPlayers();
                MapObjectPlayer[] players = playerList.toArray(new MapObjectPlayer[playerList.size()]);
                goToChosenPoint(players, "Player");
                MapObjectPlayer p = choose("Go to", "Select player:", players);
                if (p != null)
                  window.curProject.moveMapTo(p.globalX, p.globalY);
              }
            }
          });
View Full Code Here

    while (this.active) {
      try {
        if (players.isEmpty()) {
          Thread.sleep(50L);
        } else {
          MapObjectPlayer p = players.pop();
          try {
            URL url = new URL("http://s3.amazonaws.com/MinecraftSkins/" + p.getName() + ".png");
            BufferedImage img = ImageIO.read(url);
            BufferedImage pimg = new BufferedImage(20,20,BufferedImage.TYPE_INT_ARGB);
            Graphics2D g2d = pimg.createGraphics();
            g2d.setColor(Color.black);
            g2d.fillRect(0, 0, 20, 20);
            g2d.drawImage(img, 2, 2, 18, 18, 8, 8, 16, 16, null);
            g2d.dispose();
            img.flush();
            p.setMarker(pimg);
            Thread.sleep(20L);
          } catch (MalformedURLException e2) {
          } catch (IOException e) {
          }
        }
View Full Code Here

TOP

Related Classes of amidst.map.MapObjectPlayer

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.