Commits
Rutr authored and TomyLobo committed 8aa79d1c4c9
174 174 | } |
175 175 | |
176 176 | if (wcfg.disableExplosionDamage && type == DamageCause.BLOCK_EXPLOSION) { |
177 177 | event.setCancelled(true); |
178 178 | return; |
179 179 | } |
180 180 | } |
181 181 | } |
182 182 | |
183 183 | private void onEntityDamageByEntity(EntityDamageByEntityEvent event) { |
184 - | if (event.getCause() == DamageCause.PROJECTILE) { |
184 + | if (event.getDamager() instanceof Projectile) { |
185 185 | onEntityDamageByProjectile(event); |
186 186 | return; |
187 187 | } |
188 188 | |
189 189 | Entity attacker = event.getDamager(); |
190 190 | Entity defender = event.getEntity(); |
191 191 | |
192 192 | if (attacker instanceof Player) { |
193 193 | Player player = (Player) attacker; |
194 194 | |