mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-22 12:16:21 +01:00
Also emulate damage sound when drowning
This commit is contained in:
parent
9fbfcb3851
commit
0f631eb1d9
@ -20,9 +20,12 @@ public class FireDamageListener extends ViaBukkitListener {
|
|||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
public void onFireDamage(EntityDamageEvent event) {
|
public void onFireDamage(EntityDamageEvent event) {
|
||||||
if (event.getEntityType() != EntityType.PLAYER) return;
|
if (event.getEntityType() != EntityType.PLAYER) return;
|
||||||
if (event.getCause() != EntityDamageEvent.DamageCause.FIRE
|
|
||||||
&& event.getCause() != EntityDamageEvent.DamageCause.FIRE_TICK
|
EntityDamageEvent.DamageCause cause = event.getCause();
|
||||||
&& event.getCause() != EntityDamageEvent.DamageCause.LAVA) {
|
if (cause != EntityDamageEvent.DamageCause.FIRE
|
||||||
|
&& cause != EntityDamageEvent.DamageCause.FIRE_TICK
|
||||||
|
&& cause != EntityDamageEvent.DamageCause.LAVA
|
||||||
|
&& cause != EntityDamageEvent.DamageCause.DROWNING) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user