Package org.getspout.spoutapi.packet

Examples of org.getspout.spoutapi.packet.PacketSky


  @Override
  public void setCloudHeight(SpoutPlayer player, int y) {
    cloudHeight.put(player.getName(), y);
    if (player.isSpoutCraftEnabled()) {
      player.sendPacket(new PacketSky(y, 0, 0 ,0));
    }
  }
View Full Code Here


  @Override
  public void setStarFrequency(SpoutPlayer player, int frequency) {
    starFrequency.put(player.getName(), frequency);
    if (player.isSpoutCraftEnabled()) {
      player.sendPacket(new PacketSky(0, frequency, 0 ,0));
    }
  }
View Full Code Here

  @Override
  public void setSunSizePercent(SpoutPlayer player, int percent) {
    sunPercent.put(player.getName(), percent);
    if (player.isSpoutCraftEnabled()) {
      player.sendPacket(new PacketSky(0, 0, percent, 0));
    }
  }
View Full Code Here

  @Override
  public void setSunTextureUrl(SpoutPlayer player, String Url) {
    if (Url == null) {
      sunUrl.remove(player.getName());
      if (player.isSpoutCraftEnabled()) {
        player.sendPacket(new PacketSky("[reset]", ""));
      }
    }
    else {
      checkUrl(Url);
      sunUrl.put(player.getName(), Url);
      if (player.isSpoutCraftEnabled()) {
        player.sendPacket(new PacketSky(Url, ""));
      }
    }
  }
View Full Code Here

  @Override
  public void setMoonSizePercent(SpoutPlayer player, int percent) {
    moonPercent.put(player.getName(), percent);
    if (player.isSpoutCraftEnabled()) {
      player.sendPacket(new PacketSky(0, 0, 0, percent));
    }
  }
View Full Code Here

  @Override
  public void setMoonTextureUrl(SpoutPlayer player, String Url) {
    if (Url == null) {
      moonUrl.remove(player.getName());
      if (player.isSpoutCraftEnabled()) {
        player.sendPacket(new PacketSky("", "[reset]"));
      }
    }
    else {
      checkUrl(Url);
      moonUrl.put(player.getName(), Url);
      if (player.isSpoutCraftEnabled()) {
        player.sendPacket(new PacketSky("", Url));
      }
    }
  }
View Full Code Here

  @Override
  public void setSkyColor(SpoutPlayer player, Color skycolor) {
    skyColor.put(player.getName(), skycolor);
    if (player.isSpoutCraftEnabled()) {
      player.sendPacket(new PacketSky(skycolor, null, null));
    }
  }
View Full Code Here

  @Override
  public void setFogColor(SpoutPlayer player, Color fogColor) {
    this.fogColor.put(player.getName(), fogColor);
    if (player.isSpoutCraftEnabled()) {
      player.sendPacket(new PacketSky(null, fogColor, null));
    }
  }
View Full Code Here

  @Override
  public void setCloudColor(SpoutPlayer player, Color cloudColor) {
    this.cloudColor.put(player.getName(), cloudColor);
    if (player.isSpoutCraftEnabled()) {
      player.sendPacket(new PacketSky(null, null, cloudColor));
    }
  }
View Full Code Here

    if (player.isSpoutCraftEnabled()) {
      String moon = getMoonTextureUrl(player);
      moon = moon == null ? "" : moon;
      String sun = getSunTextureUrl(player);
      sun = sun == null ? "" : sun;
      player.sendPacket(new PacketSky(getRealCloudHeight(player), getStarFrequency(player), getSunSizePercent(player), getMoonSizePercent(player), getSkyColor(player), getFogColor(player), getCloudColor(player), sun, moon));
    }
  }
View Full Code Here

TOP

Related Classes of org.getspout.spoutapi.packet.PacketSky

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.