Removed time stopping fields from SetTimePacket and fixed #526

TODO: rules
This commit is contained in:
Dylan K. Taylor
2017-04-11 19:26:43 +01:00
parent 022f33b256
commit 894beed59b
3 changed files with 6 additions and 18 deletions

View File

@ -628,13 +628,14 @@ class Level implements ChunkManager, Metadatable{
/**
* WARNING: Do not use this, it's only for internal use.
* Changes to this function won't be recorded on the version.
*
* @param Player ...$targets If empty, will send to all players in the level.
*/
public function sendTime(){
public function sendTime(Player ...$targets){
$pk = new SetTimePacket();
$pk->time = (int) $this->time;
$pk->started = $this->stopTime == false;
$this->server->broadcastPacket($this->players, $pk);
$this->server->broadcastPacket(count($targets) > 0 ? $targets : $this->players, $pk);
}
/**