mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-11 05:55:33 +00:00
Merge branch 'master' into 0.10
This commit is contained in:
commit
d2f4a14d66
@ -863,7 +863,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
|
||||
$time = $this->level->getTime() % Level::TIME_FULL;
|
||||
|
||||
if($time >= Level::TIME_NIGHT and $time < Level::TIME_SUNRISE);{
|
||||
if($time >= Level::TIME_NIGHT and $time < Level::TIME_SUNRISE){
|
||||
foreach($this->level->getPlayers() as $p){
|
||||
if($p->sleeping === false){
|
||||
return;
|
||||
@ -2424,6 +2424,9 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
|
||||
case EntityDamageEvent::CAUSE_BLOCK_EXPLOSION:
|
||||
case EntityDamageEvent::CAUSE_ENTITY_EXPLOSION:
|
||||
$message = $this->getName() . " blew up";
|
||||
break;
|
||||
|
||||
case EntityDamageEvent::CAUSE_MAGIC:
|
||||
case EntityDamageEvent::CAUSE_CUSTOM:
|
||||
|
||||
@ -2617,4 +2620,4 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1988,7 +1988,7 @@ class Server{
|
||||
}
|
||||
|
||||
public function __debugInfo(){
|
||||
return get_class($this);
|
||||
return [];
|
||||
}
|
||||
|
||||
private function tickProcessor(){
|
||||
|
@ -1175,7 +1175,7 @@ abstract class Entity extends Location implements Metadatable{
|
||||
}
|
||||
|
||||
public function close(){
|
||||
if($this->closed === false){
|
||||
if(!$this->closed){
|
||||
$this->server->getPluginManager()->callEvent(new EntityDespawnEvent($this));
|
||||
$this->closed = true;
|
||||
unset($this->level->updateEntities[$this->id]);
|
||||
|
@ -205,7 +205,7 @@ class Explosion{
|
||||
$tnt->spawnToAll();
|
||||
}elseif(mt_rand(0, 100) < $yield){
|
||||
foreach($block->getDrops($air) as $drop){
|
||||
$this->level->dropItem($block, Item::get(...$drop));
|
||||
$this->level->dropItem($block->add(0.5, 0.5, 0.5), Item::get(...$drop));
|
||||
}
|
||||
}
|
||||
$this->level->setBlockIdAt($block->x, $block->y, $block->z, 0);
|
||||
|
@ -170,7 +170,7 @@ class Chunk extends BaseChunk{
|
||||
$entities = [];
|
||||
|
||||
foreach($this->getEntities() as $entity){
|
||||
if(!($entity instanceof Player) and $entity->closed !== true){
|
||||
if(!($entity instanceof Player) and !$entity->closed){
|
||||
$entity->saveNBT();
|
||||
$entities[] = $entity->namedtag;
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ abstract class Tile extends Position{
|
||||
public $z;
|
||||
public $attach;
|
||||
public $metadata;
|
||||
public $closed;
|
||||
public $closed = false;
|
||||
public $namedtag;
|
||||
protected $lastUpdate;
|
||||
protected $server;
|
||||
@ -69,7 +69,6 @@ abstract class Tile extends Position{
|
||||
$this->chunk = $chunk;
|
||||
$this->setLevel($chunk->getProvider()->getLevel());
|
||||
$this->namedtag = $nbt;
|
||||
$this->closed = false;
|
||||
$this->name = "";
|
||||
$this->lastUpdate = microtime(true);
|
||||
$this->id = Tile::$tileCount++;
|
||||
@ -112,7 +111,7 @@ abstract class Tile extends Position{
|
||||
}
|
||||
|
||||
public function close(){
|
||||
if($this->closed === false){
|
||||
if(!$this->closed){
|
||||
$this->closed = true;
|
||||
unset($this->level->updateTiles[$this->id]);
|
||||
if($this->chunk instanceof FullChunk){
|
||||
|
Loading…
x
Reference in New Issue
Block a user