Okay, I know it sounds weird ( LOL ) but the playsound code line seems to ignore it's basic call sometimes.
Like I know it has been called, I know sometimes it works, but for some unforseen mystery reason it doesn't play the sound sometimes.
The code works fine, I even used message in the chat to confirm that the sound is supposed to play. But it just doesn't sometimes.
(What I mean is the chat tells me when the sound should play at the exact same time the message appear. BUT sometime the message goes but the sound does not.)
This bugs me, I though it would be a client or server problem... But I have absolutelly no Idea what's causing the playsound to just ignore it's function.
I suspect it's because there somewhat of a limit of sounds that can be emitted from one single entity ?
Because my goal was to make a custom damage sound based on how much damage a player takes. (it never plays) [I used the onEntityHurtEvent everything work except the playsound]
And a low health beeping noise... (in a loop, yet... sometimes it plays, sometimes it does not.) [But it seems like it cannot plays the sound if it is already playing. However, I've tried using a duplicaded sound track but NOPE it just won't let the sound play one right after another.]
I've tried putting the stream to false :
-No progress so far.
-No crashes either.
-All sounds are also correctly registererd.
-Using /Playsound commands works perfectly. (The sound works fine. The playsound in the mods code is inconsistent)
I really need the help from ya'll.