Package org.getspout.spoutapi.packet

Examples of org.getspout.spoutapi.packet.PacketPlaySound


  public void playSoundEffect(SpoutPlayer target, SoundEffect effect, Location location, int distance, int volumePercent) {
    if (target.isSpoutCraftEnabled()) {
      SpoutCraftPlayer ccp = (SpoutCraftPlayer) target;
      if (location == null || ccp.getWorld().equals(location.getWorld())) {
        if (location == null) {
          ccp.sendPacket(new PacketPlaySound(effect, distance, volumePercent));
        } else {
          ccp.sendPacket(new PacketPlaySound(effect, location, distance, volumePercent));
        }
      }
    }
  }
View Full Code Here


      Bukkit.getServer().getPluginManager().callEvent(event);
      if (event.isCancelled()) {
        return;
      }

      ((SpoutCraftPlayer) target).sendPacket(new PacketPlaySound(music, event.getVolumePercent()));
    }
  }
View Full Code Here

TOP

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

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.