Play party ping sound only when ping is in scene

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2019-02-04 00:18:38 +01:00
parent 12ae359876
commit 5f38f74c6f

View File

@@ -243,6 +243,13 @@ public class PartyPlugin extends Plugin implements KeyListener
if (config.sounds())
{
WorldPoint point = event.getPoint();
if (point.getPlane() != client.getPlane() || !WorldPoint.isInScene(client, point.getX(), point.getY()))
{
return;
}
client.playSoundEffect(SoundEffectID.SMITH_ANVIL_TINK);
}
}