Skip to content

Commit

Permalink
fix(combat): compare entity IDs, not actual objects
Browse files Browse the repository at this point in the history
  • Loading branch information
DataM0del committed Dec 29, 2024
1 parent d5e500e commit 2178d25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pumpkin/src/net/packet/play.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2178d25

Please sign in to comment.