mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 04:15:04 +00:00
SetDifficultyPacket: added create()
This commit is contained in:
@@ -2772,8 +2772,7 @@ class World implements ChunkManager, Metadatable{
|
||||
* @param Player ...$targets
|
||||
*/
|
||||
public function sendDifficulty(Player ...$targets){
|
||||
$pk = new SetDifficultyPacket();
|
||||
$pk->difficulty = $this->getDifficulty();
|
||||
$pk = SetDifficultyPacket::create($this->getDifficulty());
|
||||
if(empty($targets)){
|
||||
$this->broadcastGlobalPacket($pk);
|
||||
}else{
|
||||
|
Reference in New Issue
Block a user