#Making player silent

2 messages · Page 1 of 1 (latest)

keen locust
#

I want to make players silent with a status effect. There is setSilent function, which makes LivingEntity silent, but it doesn’t work for PlayerEntity (somewhy). I tried mixin in LivingEntity.playSound and World.playSound, added if(!source.hasStatusEffect(my effect)), but neither worked - everything works no matter if player has status effect. So I wonder how to cancel sound from player including footsteps, damage, eating, taking damage and etc

open scaffold
#

Are you sure it's not just playing on the client? It's possible the sound is played on the client, but not to other players