mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
PlayerAPI::remove removes a player from the table by his clientID, packets wont be handled after the player was kicked due to player already ingame
This commit is contained in:
parent
bbe9e0ee13
commit
ba4ccafa32
3 changed files with 8 additions and 3 deletions
|
|
@ -521,7 +521,11 @@ class PlayerAPI{
|
|||
if($player->username != "" and ($player->data instanceof Config)){
|
||||
$this->saveOffline($player->data);
|
||||
}
|
||||
$this->server->query("DELETE FROM players WHERE name = '" . $player->username . "';");
|
||||
|
||||
$this->server->preparedSQL->player->deleteCID->reset();
|
||||
$this->server->preparedSQL->player->deleteCID->bindValue(":CID", $CID);
|
||||
$this->server->preparedSQL->player->getEq->execute();
|
||||
|
||||
$this->server->api->entity->remove($player->eid);
|
||||
unset($player->level->players[$player->CID]);
|
||||
if($player->entity instanceof Entity){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue