Fixed explosions one-shotting people.

This commit is contained in:
sigonasr2 2016-08-23 00:34:19 -05:00
parent f60ca84d7f
commit 767c633093
3 changed files with 5 additions and 1 deletions

Binary file not shown.

View File

@ -311,7 +311,7 @@ public class EliteMonster {
}
private void retargetInAir() {
if (Math.random()<=0.08 ) {
if (Math.random()<=0.01) {
Player p = ChooseRandomTarget();
//p.addPotionEffect(new PotionEffect(PotionEffectType.LEVITATION,20*5,-31));
p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP,20*5,-1));

View File

@ -4119,6 +4119,10 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
ev.getCause()!=DamageCause.MAGIC) {
//We handle the event inside of here. DealDamage(ev.getDamage(DamageModifier.BASE));
if (ev.getCause()==DamageCause.BLOCK_EXPLOSION) {
ev.setDamage(DamageModifier.BASE,0);
ev.setCancelled(true);
} else
if (ev.getEntity() instanceof LivingEntity) {
//log("Will damage be applied? "+CustomDamage.ApplyDamage(ev.getDamage(DamageModifier.BASE), null, (LivingEntity)ev.getEntity(), null, null),2);
LivingEntity l = (LivingEntity)ev.getEntity();