mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-25 05:59:44 +00:00
Fixed regeneration acting on all gamemodes
This commit is contained in:
parent
7404279f15
commit
5a278f8a16
1 changed files with 10 additions and 8 deletions
|
|
@ -53,6 +53,7 @@ class PlayerAPI{
|
|||
public function handle($data, $event){
|
||||
switch($event){
|
||||
case "server.regeneration":
|
||||
if($this->server->difficulty === 0){
|
||||
$result = $this->server->preparedSQL->selectPlayersToHeal->execute();
|
||||
if($result !== false){
|
||||
while(($player = $result->fetchArray()) !== false){
|
||||
|
|
@ -65,6 +66,7 @@ class PlayerAPI{
|
|||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "player.death":
|
||||
if(is_numeric($data["cause"])){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue