mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-15 07:55:31 +00:00
Fixed Hardcore flags
This commit is contained in:
parent
b564868467
commit
8d00ef381d
@ -270,6 +270,9 @@ class ServerAPI{
|
|||||||
}
|
}
|
||||||
$this->config->set($n, $v);
|
$this->config->set($n, $v);
|
||||||
}
|
}
|
||||||
|
if($this->getProperty("hardcore") == 1 and $this->getProperty("difficulty") < 3){
|
||||||
|
$this->setProperty("difficulty", 3);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function init(){
|
public function init(){
|
||||||
|
@ -797,7 +797,7 @@ class Entity extends Position{
|
|||||||
if($this->player instanceof Player){
|
if($this->player instanceof Player){
|
||||||
$this->player->blocked = true;
|
$this->player->blocked = true;
|
||||||
$this->server->api->dhandle("player.death", array("player" => $this->player, "cause" => $cause));
|
$this->server->api->dhandle("player.death", array("player" => $this->player, "cause" => $cause));
|
||||||
if(($this->player->gamemode & 0x01) === 0 and $this->server->api->getProperty("hardcore") == 1){
|
if($this->server->api->getProperty("hardcore") == 1){
|
||||||
$this->server->api->ban->ban($this->player->username);
|
$this->server->api->ban->ban($this->player->username);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user