Code to play sound at the Player Location? Would this be right? So Other players can hear It sorry testing this out my self, So IDK Code (Text): player.getWorld().playSound(player.getLocation(), Sound.BAT_TAKEOFF,10, 10);
A good place to find answers to such questions, have a look at the Javadocs. There you can see explanations of the Methods and may find methods you else would have not looked at. The Method you use is here. So to answer your question. Yes. Given that the rest of the code arround it is correct
Naa man It Don't Work. It Plays Sound For All players in the server I Just want it to play sound for at getting the player location and other people can hear if a Example: Get close enough to hear the Killing of a mob Code (Text): event.getPlayer().getWorld().playSound(event.getPlayer().getLocation(), Sound.GHAST_FIREBALL, 10, 1);
Nope same thing. now it just plays sound to the player it self Example: Get close enough to hear the Killing of a mob Code (Text): event.getPlayer().playSound(event.getPlayer().getLocation(), Sound.GHAST_FIREBALL, 10, 1);
Well. You put the Volume to 10. That's AFAIK global or at least quite far. Turn the volume down and not everyone will hear it