From 2178d2536dd3949c50d71ed2109294dab3e0baf0 Mon Sep 17 00:00:00 2001 From: DataM0del <183248792+DataM0del@users.noreply.github.com> Date: Sun, 29 Dec 2024 09:40:49 -0500 Subject: [PATCH] fix(combat): compare entity IDs, not actual objects --- pumpkin/src/net/packet/play.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pumpkin/src/net/packet/play.rs b/pumpkin/src/net/packet/play.rs index e7aa4e1d..8ecb3d20 100644 --- a/pumpkin/src/net/packet/play.rs +++ b/pumpkin/src/net/packet/play.rs @@ -560,7 +560,7 @@ impl Player { // so we shouldn't kick the player return; } - if victim == self { + if victim.entity_id() == self.entity_id() { // this, however, can't be triggered from a non-modded client. self.kick(TextComponent::text("You can't attack yourself")).await; return;