Source:
private void affect(final Entity entity) { if (entity instanceof Player) { if (Commands.invincible.contains(((Player) entity).getName())) { return; } } final boolean isUser = entity.getUniqueId() == this.player.getUniqueId(); double knockback = this.pushFactorForOthers; if (isUser) { if (isFromOtherOrigin) { knockback = this.pushFactor; } else { return; } } final double max = this.speed / this.speedFactor; final Vector push = this.direction.clone(); if (Math.abs(push.getY()) > max && !isUser) { if (push.getY() < 0) { push.setY(-max); } else { push.setY(max); } } if (this.location.getWorld().equals(this.origin.getWorld())) { knockback *= 1 - this.location.distance(this.origin) / (2 * this.range); } if (GeneralMethods.isSolid(entity.getLocation().add(0, -.5, 0).getBlock())) { knockback *= .5; } if (!this.affectedEntities.contains(entity)) { GeneralMethods.setVelocity(entity, push.multiply(knockback)); this.affectedEntities.add(entity); } if (this.source != null) { new HorizontalVelocityTracker(entity, this.player, 200l, this.source); } else { new HorizontalVelocityTracker(entity, this.player, 200l, this); } if (entity.getFireTicks() > 0) { entity.getWorld().playEffect(entity.getLocation(), Effect.EXTINGUISH, 0); } entity.setFireTicks(0); breakBreathbendingHold(entity); if (this.damage > 0 && entity instanceof LivingEntity && !entity.equals(this.player)) { if (this.source != null) { DamageHandler.damageEntity(entity, this.damage, this.source); } else { DamageHandler.damageEntity(entity, this.damage, this); } } }

Target:
private void affect(final Entity entity) { if (entity instanceof Player) { if (Commands.invincible.contains(((Player) entity).getName())) { return; } } if (!affectedEntities.contains(entity)) { final boolean isUser = entity.getUniqueId() == this.player.getUniqueId(); double knockback = this.pushFactorForOthers; if (isUser) { if (isFromOtherOrigin) { knockback = this.pushFactor; } else { return; } } final double max = this.speed / this.speedFactor; final Vector push = this.direction.clone(); if (Math.abs(push.getY()) > max && !isUser) { if (push.getY() < 0) { push.setY(-max); } else { push.setY(max); } } if (this.location.getWorld().equals(this.origin.getWorld())) { knockback *= 1 - this.location.distance(this.origin) / (2 * this.range); } if (GeneralMethods.isSolid(entity.getLocation().add(0, -.5, 0).getBlock())) { knockback *= .5; } push.normalize().multiply(knockback); if (Math.abs(entity.getVelocity().dot(push)) > knockback) { push.normalize().add(entity.getVelocity()).multiply(knockback); } GeneralMethods.setVelocity(entity, push); if (this.source != null) { new HorizontalVelocityTracker(entity, this.player, 200l, this.source); } else { new HorizontalVelocityTracker(entity, this.player, 200l, this); } if (this.damage > 0 && entity instanceof LivingEntity && !entity.equals(this.player)) { if (this.source != null) { DamageHandler.damageEntity(entity, this.damage, this.source); } else { DamageHandler.damageEntity(entity, this.damage, this); } } this.affectedEntities.add(entity); } if (entity.getFireTicks() > 0) { entity.getWorld().playEffect(entity.getLocation(), Effect.EXTINGUISH, 0); } entity.setFireTicks(0); breakBreathbendingHold(entity); }