mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 01:51:51 +00:00
Send sign text on update
This commit is contained in:
parent
2fff23019a
commit
8da61e613f
@ -1100,7 +1100,7 @@ class Player{
|
|||||||
$this->close("Incorrect protocol #".$data["protocol1"], false);
|
$this->close("Incorrect protocol #".$data["protocol1"], false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(preg_match('#[^a-zA-Z0-9_]#', $data["username"]) == 0 && $data["username"] != ""){
|
if(preg_match('#[^a-zA-Z0-9_]#', $data["username"]) == 0 and $data["username"] != ""){
|
||||||
$this->username = $data["username"];
|
$this->username = $data["username"];
|
||||||
$this->iusername = strtolower($this->username);
|
$this->iusername = strtolower($this->username);
|
||||||
}else{
|
}else{
|
||||||
|
@ -103,6 +103,8 @@ class Tile extends Position{
|
|||||||
|
|
||||||
$this->server->api->tile->spawnToAll($this);
|
$this->server->api->tile->spawnToAll($this);
|
||||||
$this->server->api->tile->spawnToAll($tile);
|
$this->server->api->tile->spawnToAll($tile);
|
||||||
|
$this->server->handle("tile.update", $this);
|
||||||
|
$this->server->handle("tile.update", $tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function unpair(){
|
public function unpair(){
|
||||||
@ -113,9 +115,11 @@ class Tile extends Position{
|
|||||||
$tile = $this->getPair();
|
$tile = $this->getPair();
|
||||||
unset($this->data["pairx"], $this->data["pairz"], $tile->data["pairx"], $tile->data["pairz"]);
|
unset($this->data["pairx"], $this->data["pairz"], $tile->data["pairx"], $tile->data["pairz"]);
|
||||||
|
|
||||||
$this->server->api->tile->spawnToAll($this);
|
$this->server->api->tile->spawnToAll($this);
|
||||||
|
$this->server->handle("tile.update", $this);
|
||||||
if($tile instanceof Tile){
|
if($tile instanceof Tile){
|
||||||
$this->server->api->tile->spawnToAll($tile);
|
$this->server->api->tile->spawnToAll($tile);
|
||||||
|
$this->server->handle("tile.update", $tile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -438,6 +442,7 @@ class Tile extends Position{
|
|||||||
$this->data["Text2"] = $line2;
|
$this->data["Text2"] = $line2;
|
||||||
$this->data["Text3"] = $line3;
|
$this->data["Text3"] = $line3;
|
||||||
$this->data["Text4"] = $line4;
|
$this->data["Text4"] = $line4;
|
||||||
|
$this->server->api->tile->spawnToAll($this);
|
||||||
$this->server->handle("tile.update", $this);
|
$this->server->handle("tile.update", $this);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user