mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-19 20:24:29 +00:00
Kill player below -16 as now the bottom of the world can be rendered, send player count
This commit is contained in:
parent
76e6ccebd5
commit
7a34417e67
@ -2424,6 +2424,8 @@ class Server{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->getNetwork()->updateName();
|
||||
}
|
||||
|
||||
if($this->autoSave and ++$this->autoSaveTicker >= $this->autoSaveTicks){
|
||||
|
@ -744,7 +744,7 @@ abstract class Entity extends Location implements Metadatable{
|
||||
|
||||
$this->checkBlockCollision();
|
||||
|
||||
if($this->y < 0 and $this->isAlive()){
|
||||
if($this->y <= -16 and $this->isAlive()){
|
||||
$ev = new EntityDamageEvent($this, EntityDamageEvent::CAUSE_VOID, 10);
|
||||
$this->attack($ev->getFinalDamage(), $ev);
|
||||
$hasUpdate = true;
|
||||
|
@ -195,6 +195,12 @@ class Network{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function updateName(){
|
||||
foreach($this->interfaces as $interface){
|
||||
$interface->setName($this->name);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id 0-255
|
||||
* @param DataPacket $class
|
||||
|
@ -172,7 +172,13 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
|
||||
}
|
||||
|
||||
public function setName($name){
|
||||
$this->interface->sendOption("name", "MCPE;".addcslashes($name, ";").";".Info::CURRENT_PROTOCOL.";".\pocketmine\MINECRAFT_VERSION_NETWORK);
|
||||
$this->interface->sendOption("name",
|
||||
"MCPE;".addcslashes($name, ";") .";".
|
||||
Info::CURRENT_PROTOCOL.";".
|
||||
\pocketmine\MINECRAFT_VERSION_NETWORK.";".
|
||||
count($this->server->getOnlinePlayers()).";".
|
||||
$this->server->getMaxPlayers()
|
||||
);
|
||||
}
|
||||
|
||||
public function setPortCheck($name){
|
||||
|
Loading…
x
Reference in New Issue
Block a user