[SPIGOT-251] Player.playSound should not be deprecated. Created: 20/Dec/14  Updated: 11/Dec/17  Resolved: 28/May/15

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: SB_Prime Assignee: md_5
Resolution: Fixed Votes: 0
Labels: API,, Deprecated


 Description   

The Player.playSound(Location location, String name, float volume, float pitch); is marked as deprecated. If this gets removed we are going to lose the ability to play sounds from custom resource packs.

If however this needs to by removed we need a new API that will allow the playback of custom sounds.



 Comments   
Comment by Oliver Dunk [ 28/May/15 ]

Opened up PR Bukkit #75 to patch.

Comment by SB_Prime [ 20/Dec/14 ]

I agree with the first part of your answer. However I do not agree that it should by replaced with enum version of the function.
1 there is a enum version of playSound that uses the Sound class/enum
2 if you stick only to enum version you won't be able to play custom sounds from custom resources. For example if I have "myserver.mission" sound in my custom resource pack then I need to send the name of the sound using playSound.

Comment by FearThe1337 [ 20/Dec/14 ]

A lot of stuff is still deprecated from the Bukkit days.
Last I heard they said eventually someone would need to sort through it all and decide what should be removed and what should be kept.
So, In this case deprecated does not necessary mean it will be removed.
PS: It will most likely be replaced with a similar function, however with name replaced with an Enum value.

Generated at Sat Mar 22 19:45:43 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.