mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Fixed players getting full health on rejoin after quitting on death
This makes #1567 less exploitable. Now, players who attempt to exploit this bug will get stuck - they won't be able to move or do anything. Not ideal, because they won't be able to respawn either - but it's better than nothing.
This commit is contained in:
parent
28996f561f
commit
1d4bafb6ff
@ -922,6 +922,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
|||||||
|
|
||||||
if($amount <= 0){
|
if($amount <= 0){
|
||||||
if($this->isAlive()){
|
if($this->isAlive()){
|
||||||
|
$this->health = 0;
|
||||||
$this->kill();
|
$this->kill();
|
||||||
}
|
}
|
||||||
}elseif($amount <= $this->getMaxHealth() or $amount < $this->health){
|
}elseif($amount <= $this->getMaxHealth() or $amount < $this->health){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user