World: remove protocol-specialized broadcastLevelEvent()

This commit is contained in:
Dylan K. Taylor
2020-05-04 02:28:34 +01:00
parent f34753c496
commit b1021315b0
2 changed files with 2 additions and 16 deletions

View File

@@ -477,20 +477,6 @@ class World implements ChunkManager{
}
}
/**
* Broadcasts a LevelEvent to players in the area. This could be sound, particles, weather changes, etc.
*
* @param Vector3|null $pos If null, broadcasts to every player in the World
*/
public function broadcastLevelEvent(?Vector3 $pos, int $evid, int $data = 0) : void{
$pk = LevelEventPacket::create($evid, $data, $pos);
if($pos !== null){
$this->broadcastPacketToViewers($pos, $pk);
}else{
$this->broadcastGlobalPacket($pk);
}
}
public function getAutoSave() : bool{
return $this->autoSave;
}