1.16.5 is it possible to change a sound's location after its played?

Discussion in 'Spigot Plugin Development' started by FlameFOxYT, Jun 7, 2021.

  1. I know that when you play a sound at the player's location, it will play it even if teleported 100 blocks away,
    at the same volume, is there a way to change the sound's location while its playing?
     
  2. There is no way to change an already loaded sound. What you can do is break the sound into multiplie parts and play each of them at a different location
     
  3. Player#playSound() returns void, therefore there is no way for you to retreive the sent sound and change it parameters.
     
  4. Send a StopSound packet and play the sound again.
     
  5. It's possible, but I think it's a little bit inefficient due to the complexity (packets), and if OP wants to continue playing it from the place where it's stopped, it's most likely impossible.

    Sent from my TECNO CC7 using Tapatalk
     
  6. why don't you keep playing on the same location?
     
  7. Once the sound has started it cannot be moved nor stopped. The sound will play until it is over. You can send a packet to players to stop the sound tho or teleport them away from the location.