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:
Dylan K. Taylor 2018-01-24 12:27:10 +00:00
parent 28996f561f
commit 1d4bafb6ff

View File

@ -922,6 +922,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
if($amount <= 0){
if($this->isAlive()){
$this->health = 0;
$this->kill();
}
}elseif($amount <= $this->getMaxHealth() or $amount < $this->health){