Fixed a problem with certain types of damage not working.

This commit is contained in:
sigonasr2 2016-08-25 18:44:34 -05:00
parent 6be1190751
commit 032b72113f
3 changed files with 5 additions and 2 deletions

Binary file not shown.

View File

@ -592,7 +592,7 @@ public class EliteMonster {
m.addPotionEffect(new PotionEffect(PotionEffectType.LEVITATION,Integer.MAX_VALUE,60)); m.addPotionEffect(new PotionEffect(PotionEffectType.LEVITATION,Integer.MAX_VALUE,60));
} }
},8); },8);
target_leap_loc = target.getLocation(); target_leap_loc = target.getLocation().clone();
m.addPotionEffect(new PotionEffect(PotionEffectType.LEVITATION,Integer.MAX_VALUE,20)); m.addPotionEffect(new PotionEffect(PotionEffectType.LEVITATION,Integer.MAX_VALUE,20));
for (int x=-radius;x<radius+1;x++) { for (int x=-radius;x<radius+1;x++) {
for (int z=-radius;z<radius+1;z++) { for (int z=-radius;z<radius+1;z++) {

View File

@ -4157,13 +4157,16 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
dmgdealt *= GenericFunctions.CalculateFallResistance((LivingEntity)ev.getEntity()); dmgdealt *= GenericFunctions.CalculateFallResistance((LivingEntity)ev.getEntity());
} }
boolean applieddmg = CustomDamage.ApplyDamage(dmgdealt, null, (LivingEntity)ev.getEntity(), null, ev.getCause().name(), CustomDamage.TRUEDMG);
if ((ev.getCause()==DamageCause.CONTACT || if ((ev.getCause()==DamageCause.CONTACT ||
ev.getCause()==DamageCause.LIGHTNING || ev.getCause()==DamageCause.LIGHTNING ||
ev.getCause()==DamageCause.FALLING_BLOCK || ev.getCause()==DamageCause.FALLING_BLOCK ||
ev.getCause()==DamageCause.BLOCK_EXPLOSION || ev.getCause()==DamageCause.BLOCK_EXPLOSION ||
ev.getCause()==DamageCause.FIRE || ev.getCause()==DamageCause.FIRE ||
ev.getCause()==DamageCause.LAVA) && ev.getCause()==DamageCause.LAVA) &&
(ev.getEntity() instanceof Player) && CustomDamage.ApplyDamage(dmgdealt, null, (LivingEntity)ev.getEntity(), null, ev.getCause().name(), CustomDamage.TRUEDMG)) { (ev.getEntity() instanceof Player) &&
applieddmg) {
Player p = (Player)ev.getEntity(); Player p = (Player)ev.getEntity();
damageArmor(p,1); damageArmor(p,1);
}; };