Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dsfhdshdjtsb committed Mar 28, 2024
1 parent 607a807 commit 7bb49f8
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ public void onTargetDamaged(LivingEntity user, Entity target, int level) {
for (LivingEntity e : list) {
if (!e.equals(user)) {
counter++;
e.damage(target.getWorld().getDamageSources().magic(), 1.0f);
if(e instanceof PlayerEntity) {
if(user.getServer() != null && user.getServer().isPvpEnabled() ) {
e.damage(target.getWorld().getDamageSources().magic(), 1.0f);
}
} else {
e.damage(target.getWorld().getDamageSources().magic(), 1.0f);
}

if (target.getWorld() instanceof ServerWorld) {
double xdif = e.getX() - user.getX();
Expand Down

0 comments on commit 7bb49f8

Please sign in to comment.