mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
87 fix
This commit is contained in:
parent
1cfb43e984
commit
0275420a12
1 changed files with 3 additions and 3 deletions
|
|
@ -193,10 +193,10 @@ class Entity extends Position{
|
|||
public function environmentUpdate(){
|
||||
$hasUpdate = false;
|
||||
$time = microtime(true);
|
||||
if($this->class === ENTITY_PLAYER and ($this->player instanceof Player) and $this->player->spawned === true and $this->player->blocked !== true){
|
||||
if($this->class === ENTITY_PLAYER and ($this->player instanceof Player) and $this->player->spawned === true and $this->player->blocked !== true && !$this->dead){
|
||||
foreach($this->server->api->entity->getRadius($this, 1.5, ENTITY_ITEM) as $item){
|
||||
if($item->closed === false and $item->spawntime > 0 and ($time - $item->spawntime) >= 0.6){
|
||||
if((($this->player->gamemode & 0x01) === 1 or $this->player->hasSpace($item->type, $item->meta, $item->stack) === true) and $this->server->api->dhandle("player.pickup", array(
|
||||
if(!$item->closed && $item->spawntime > 0 && ($time - $item->spawntime) >= 0.6){
|
||||
if((($this->player->gamemode & 0x01) === 1 || $this->player->hasSpace($item->type, $item->meta, $item->stack) === true) && $this->server->api->dhandle("player.pickup", array(
|
||||
"eid" => $this->player->eid,
|
||||
"player" => $this->player,
|
||||
"entity" => $item,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue