mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Changed messages
This commit is contained in:
parent
5c2a2ecd6d
commit
62735c8e41
@ -274,7 +274,7 @@ class PlayerAPI{
|
||||
public function add($CID){
|
||||
if(isset($this->server->clients[$CID])){
|
||||
$player = $this->server->clients[$CID];
|
||||
console("[INFO] Player \"\x1b[33m".$player->username."\x1b[0m\" connected from \x1b[36m".$player->ip.":".$player->port."\x1b[0m");
|
||||
console("[INFO] Player \x1b[33m".$player->username."\x1b[0m connected from \x1b[36m".$player->ip.":".$player->port."\x1b[0m");
|
||||
$player->data = $this->getOffline($player->username);
|
||||
$player->gamemode = $player->data->get("gamemode");
|
||||
$this->server->query("INSERT OR REPLACE INTO players (clientID, ip, port, name) VALUES (".$player->clientID.", '".$player->ip."', ".$player->port.", '".strtolower($player->username)."');");
|
||||
|
@ -679,10 +679,10 @@ class Player{
|
||||
}
|
||||
|
||||
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);
|
||||
return;
|
||||
}elseif($this->server->api->ban->isBanned($this->iusername) or $this->server->api->ban->isIPBanned($this->ip)){
|
||||
$this->close("\"\x1b[33m".$this->username."\x1b[0m\" is banned!", false);
|
||||
$this->close("\x1b[33m".$this->username."\x1b[0m is banned!", false);
|
||||
return;
|
||||
}
|
||||
$this->loggedIn = true;
|
||||
@ -767,7 +767,7 @@ class Player{
|
||||
$this->server->api->entity->spawnToAll($this->eid);
|
||||
$this->server->schedule(5, array($this->entity, "update"), array(), true);
|
||||
$this->server->api->dhandle("player.armor", array("eid" => $this->eid, "slot0" => ($this->armor[0][0] > 0 ? ($this->armor[0][0] - 256):AIR), "slot1" => ($this->armor[1][0] > 0 ? ($this->armor[1][0] - 256):AIR), "slot2" => ($this->armor[2][0] > 0 ? ($this->armor[2][0] - 256):AIR), "slot3" => ($this->armor[3][0] > 0 ? ($this->armor[3][0] - 256):AIR)));
|
||||
console("[DEBUG] Player \"".$this->username."\" EID ".$this->eid." spawned at X ".$this->entity->x." Y ".$this->entity->y." Z ".$this->entity->z, true, true, 2);
|
||||
console("[INFO] \x1b[33m".$player->username."\x1b[0m logged in with entity id ".$this->eid." at (".$this->entity->x.", ".$this->entity->y.", ".$this->entity->z.")");
|
||||
$this->eventHandler(new Container($this->server->motd), "server.chat");
|
||||
if($this->MTU <= 548){
|
||||
$this->eventHandler("Your connection is bad, you may experience lag and slow map loading.", "server.chat");
|
||||
@ -798,10 +798,11 @@ class Player{
|
||||
if(($this->entity instanceof Entity) and $data["counter"] > $this->lastMovement){
|
||||
$this->lastMovement = $data["counter"];
|
||||
$speed = $this->entity->getSpeed();
|
||||
if($this->blocked === true or ($speed > 5 and $this->gamemode !== CREATIVE) or $speed > 12 or $this->server->api->handle("player.move", $this->entity) === false){
|
||||
if($this->blocked === true or ($speed > 5 and $this->gamemode !== CREATIVE) or $speed > 13 or $this->server->api->handle("player.move", $this->entity) === false){
|
||||
if($this->lastCorrect instanceof Vector3){
|
||||
$this->teleport($this->lastCorrect, $this->entity->yaw, $this->entity->pitch, false);
|
||||
}
|
||||
console("[WARNING] ".$this->username." moved too quickly!");
|
||||
}else{
|
||||
$this->entity->setPosition($data["x"], $data["y"], $data["z"], $data["yaw"], $data["pitch"]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user