Don't use deny effects for entities because they look bad.

This commit is contained in:
sk89q 2014-08-31 19:18:32 -07:00
parent 2e6faff8c1
commit 59bd11e742

View File

@ -622,10 +622,6 @@ public void onPlayerInteractEntity(PlayerInteractEntityEvent event) {
Events.fireToCancel(event, new UseItemEvent(event, create(player), world, item));
Events.fireToCancel(event, new UseEntityEvent(event, create(player), entity));
if (event.isCancelled()) {
playDenyEffect(player, entity.getLocation().add(0, 1, 0));
}
}
@EventHandler(ignoreCancelled = true)
@ -649,11 +645,6 @@ public void onEntityDamage(EntityDamageEvent event) {
}
}
if (event.isCancelled() && damager instanceof Player) {
Player player = (Player) damager;
playDenyEffect(player, event.getEntity().getLocation().add(0, 1, 0));
}
} else {
Events.fireToCancel(event, new DamageEntityEvent(event, Cause.unknown(), event.getEntity()));
}
@ -690,10 +681,6 @@ public void onEntityTame(EntityTameEvent event) {
@EventHandler(ignoreCancelled = true)
public void onPlayerShearEntity(PlayerShearEntityEvent event) {
Events.fireToCancel(event, new UseEntityEvent(event, create(event.getPlayer()), event.getEntity()));
if (event.isCancelled()) {
playDenyEffect(event.getPlayer(), event.getEntity().getLocation().add(0, 1, 0));
}
}
@EventHandler(ignoreCancelled = true)
@ -711,10 +698,6 @@ public void onPlayerDropItem(PlayerDropItemEvent event) {
public void onVehicleDamage(VehicleDamageEvent event) {
Entity attacker = event.getAttacker();
Events.fireToCancel(event, new DestroyEntityEvent(event, create(attacker), event.getVehicle()));
if (event.isCancelled() && attacker instanceof Player) {
playDenyEffect((Player) attacker, event.getVehicle().getLocation());
}
}
@EventHandler(ignoreCancelled = true)