mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 11:58:00 +00:00
World: remove protocol-specialized broadcastLevelEvent()
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user