mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Fixed crashes, added flying check
This commit is contained in:
parent
2043534003
commit
2b741a2913
4 changed files with 43 additions and 10 deletions
|
|
@ -110,7 +110,7 @@ class Player{
|
|||
public function getNextChunk($repeat = false){
|
||||
$c = key($this->chunksOrder);
|
||||
$d = $this->chunksOrder[$c];
|
||||
if($c === null or $d > $this->server->getProperty("view-distance")){
|
||||
if($c === null or $d > $this->server->api->getProperty("view-distance")){
|
||||
$this->server->schedule(50, array($this, "getNextChunk"));
|
||||
return false;
|
||||
}
|
||||
|
|
@ -858,7 +858,7 @@ class Player{
|
|||
$data["entity"] = $this->entity;
|
||||
if(!($target instanceof Entity)){
|
||||
break;
|
||||
}elseif($target->class === ENTITY_PLAYER and ($this->server->getProperty("pvp") == false or $this->server->difficulty <= 0 or $target->player->gamemode === CREATIVE)){
|
||||
}elseif($target->class === ENTITY_PLAYER and ($this->server->api->getProperty("pvp") == false or $this->server->difficulty <= 0 or $target->player->gamemode === CREATIVE)){
|
||||
break;
|
||||
}elseif($this->handle("player.interact", $data) !== false){
|
||||
switch($this->equipment->getID()){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue