mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Remove Chest TileEntities on break
This commit is contained in:
parent
69a1c97a36
commit
ccd1231d42
5 changed files with 70 additions and 5 deletions
|
|
@ -31,10 +31,16 @@ class TileEntityAPI{
|
|||
$this->server = $server;
|
||||
}
|
||||
|
||||
public function get($x, $y, $z){
|
||||
$x = (int) $x;
|
||||
$y = (int) $y;
|
||||
$z = (int) $z;
|
||||
public function get($x, $y = false, $z = false){
|
||||
if(($x instanceof Vector3) or ($x instanceof Block)){
|
||||
$z = (int) $x->z;
|
||||
$y = (int) $x->y;
|
||||
$x = (int) $x->x;
|
||||
}else{
|
||||
$x = (int) $x;
|
||||
$y = (int) $y;
|
||||
$z = (int) $z;
|
||||
}
|
||||
$tiles = $this->server->query("SELECT * FROM tileentities WHERE x = $x AND y = $y AND z = $z;");
|
||||
$ret = array();
|
||||
if($tiles !== false and $tiles !== true){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue