mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Fixed Time, Death and more event issues
This commit is contained in:
@ -44,7 +44,7 @@ class PlayerAPI{
|
||||
case "onHealthRegeneration":
|
||||
$result = $this->server->query("SELECT ip,port FROM players WHERE EID = (SELECT EID FROM entities WHERE health < 20);", true);
|
||||
if($result !== true and $result !== false){
|
||||
while($player = $result->fetchArray()){
|
||||
while(false !== ($player = $result->fetchArray())){
|
||||
$player->entity->setHealth(min(20, $player->entity->getHealth() + $data), "regeneration");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user