mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Fixed Time, Death and more event issues
This commit is contained in:
parent
11f4096403
commit
a833d92d76
6 changed files with 96 additions and 59 deletions
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue