mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-31 08:22:33 +00:00
fix(combat): players are getting kicked when attacking dead entities (#271)
* fix(combat): kick players attacking dead players (health <= 0.0)
This commit is contained in:
@@ -454,7 +454,11 @@ impl Player {
|
||||
.await;
|
||||
return;
|
||||
};
|
||||
|
||||
if victim.living_entity.health.load() <= 0.0 {
|
||||
// you can trigger this from a non-modded / innocent client client,
|
||||
// so we shouldn't kick the player
|
||||
return;
|
||||
}
|
||||
self.attack(&victim).await;
|
||||
}
|
||||
ActionType::Interact | ActionType::InteractAt => {
|
||||
|
||||
Reference in New Issue
Block a user