Skip to content

Commit

Permalink
Update EntityDamageByEntityListener.java
Browse files Browse the repository at this point in the history
Signed-off-by: Zoey <[email protected]>
  • Loading branch information
Zoey2936 authored Jan 20, 2024
1 parent 4fa2a8e commit 888169e
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ public void onEntityDamageByEntity(EntityDamageByEntityEvent event) {
if(!player.isEmpty() && loadConfig.throwable()) {
event.setCancelled(true);
Player passenger = (Player) player.getPassengers().get(0);
main.getThrown().add(passenger);
getVelocity.put(passenger, player.getEyeLocation().getDirection().setY(1));
player.eject();
passenger.setVelocity(player.getEyeLocation().getDirection().setY(1));
player.setVelocity(player.getEyeLocation().getDirection().setY(1));
passenger.setVelocity(player.getEyeLocation().getDirection().setY(1));
}
}
}

0 comments on commit 888169e

Please sign in to comment.