Removed $server constructor arguments because of ServerAPI::request()

This commit is contained in:
Shoghi Cervantes Pueyo 2013-03-29 19:49:33 +01:00
parent af52b0a5b5
commit 6d39f54591
17 changed files with 35 additions and 34 deletions

View file

@ -27,8 +27,8 @@ the Free Software Foundation, either version 3 of the License, or
class TileEntityAPI{
private $server;
function __construct(PocketMinecraftServer $server){
$this->server = $server;
function __construct(){
$this->server = ServerAPI::request();
}
public function get($x, $y = false, $z = false){
@ -77,7 +77,7 @@ class TileEntityAPI{
public function add($class, $x, $y, $z, $data = array()){
$id = $this->tCnt++;
$this->server->tileEntities[$id] = new TileEntity($this->server, $id, $class, $x, $y, $z, $data);
$this->server->tileEntities[$id] = new TileEntity($id, $class, $x, $y, $z, $data);
$this->spawnToAll($id);
return $this->server->tileEntities[$id];
}