mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 21:19:44 +00:00
Added player.connect (pre-join)
This commit is contained in:
parent
77da9d3a7c
commit
8442c0529e
1 changed files with 5 additions and 1 deletions
|
|
@ -673,6 +673,10 @@ class Player{
|
||||||
$this->close("bad username", false);
|
$this->close("bad username", false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if($this->server->api->handle("player.connect", $this) === false){
|
||||||
|
$this->close("join cancelled", false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if($this->server->whitelist === true and !$this->server->api->ban->inWhitelist($this->iusername)){
|
if($this->server->whitelist === true and !$this->server->api->ban->inWhitelist($this->iusername)){
|
||||||
$this->close("\x1b[33m".$this->username."\x1b[0m not being on white-list", false);
|
$this->close("\x1b[33m".$this->username."\x1b[0m not being on white-list", false);
|
||||||
|
|
@ -688,7 +692,7 @@ class Player{
|
||||||
$u->close("logged in from another location");
|
$u->close("logged in from another location");
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->server->api->player->add($this->CID);
|
$this->server->api->player->add($this->CID);
|
||||||
if($this->server->api->handle("player.join", $this) === false){
|
if($this->server->api->handle("player.join", $this) === false){
|
||||||
$this->close("join cancelled", false);
|
$this->close("join cancelled", false);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue