diff options
author | md_5 <git@md-5.net> | 2016-03-01 17:35:18 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-03-01 17:35:18 +1100 |
commit | 4831c56cdb3d6cbabdc6a87f755d6ebd659a2459 (patch) | |
tree | 316d4b180d5963f6ce6cef72518dbed31575f8e5 /src/main/java/org | |
parent | f0c37a16714f54355e9a6a1e61025b435faf6ef6 (diff) | |
download | craftbukkit-4831c56cdb3d6cbabdc6a87f755d6ebd659a2459.tar craftbukkit-4831c56cdb3d6cbabdc6a87f755d6ebd659a2459.tar.gz craftbukkit-4831c56cdb3d6cbabdc6a87f755d6ebd659a2459.tar.lz craftbukkit-4831c56cdb3d6cbabdc6a87f755d6ebd659a2459.tar.xz craftbukkit-4831c56cdb3d6cbabdc6a87f755d6ebd659a2459.zip |
SPIGOT-1523: Add FLY_INTO_WALL DamageCause to fix Elytra crash v2.
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index abeab037..b7d747cb 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -465,7 +465,7 @@ public class CraftEventFactory { DamageCause cause = null; Block damager = blockDamage; blockDamage = null; - if (source == DamageSource.CACTUS || source == DamageSource.j) { // PAIL: rename + if (source == DamageSource.CACTUS) { cause = DamageCause.CONTACT; } else { throw new AssertionError(String.format("Unhandled damage of %s by %s from %s", entity, damager, source.translationIndex)); @@ -518,6 +518,8 @@ public class CraftEventFactory { cause = DamageCause.MAGIC; } else if (source == DamageSource.FALL) { cause = DamageCause.FALL; + } else if (source == DamageSource.j) { // PAIL: rename + cause = DamageCause.FLY_INTO_WALL; } else if (source == DamageSource.GENERIC) { return new EntityDamageEvent(entity.getBukkitEntity(), null, modifiers, modifierFunctions); } |