mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
Changes.
This commit is contained in:
parent
d5a6be70ac
commit
1e29cbbbeb
20 changed files with 98 additions and 96 deletions
|
|
@ -1285,8 +1285,6 @@ class Player{
|
|||
$this->username = $data["username"];
|
||||
$this->iusername = strtolower($this->username);
|
||||
}else{
|
||||
$this->username = $data["username"];
|
||||
$this->iusername = strtolower($this->username);
|
||||
$this->close("Bad username", false);
|
||||
break;
|
||||
}
|
||||
|
|
@ -1309,6 +1307,11 @@ class Player{
|
|||
$u->close("logged in from another location");
|
||||
}
|
||||
|
||||
if(!isset($this->CID) or $this->CID == null){
|
||||
console("[DEBUG] Player ".$this->username." does not have a CID", true, true, 2);
|
||||
$this->CID = Utils::readLong(Utils::getRandomBytes(8, false));
|
||||
}
|
||||
|
||||
$this->server->api->player->add($this->CID);
|
||||
if($this->server->api->handle("player.join", $this) === false){
|
||||
$this->close("join cancelled", false);
|
||||
|
|
@ -1370,7 +1373,7 @@ class Player{
|
|||
));
|
||||
if(($this->gamemode & 0x01) === 0x01){
|
||||
$this->slot = 0;
|
||||
$this->hotbar = array();
|
||||
$this->hotbar = array();
|
||||
}elseif($this->data->exists("hotbar")){
|
||||
$this->hotbar = $this->data->get("hotbar");
|
||||
$this->slot = $this->hotbar[0];
|
||||
|
|
@ -2218,6 +2221,7 @@ class Player{
|
|||
foreach($this->hotbar as $slot){
|
||||
$hotbar[] = $slot <= -1 ? -1 : $slot + 9;
|
||||
}
|
||||
|
||||
$this->dataPacket(MC_CONTAINER_SET_CONTENT, array(
|
||||
"windowid" => 0,
|
||||
"count" => count($this->inventory),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue