26 public const NETWORK_ID = ProtocolInfo::UPDATE_ADVENTURE_SETTINGS_PACKET;
28 private bool $noAttackingMobs;
29 private bool $noAttackingPlayers;
30 private bool $worldImmutable;
31 private bool $showNameTags;
32 private bool $autoJump;
37 public static function create(
bool $noAttackingMobs,
bool $noAttackingPlayers,
bool $worldImmutable,
bool $showNameTags,
bool $autoJump) : self{
39 $result->noAttackingMobs = $noAttackingMobs;
40 $result->noAttackingPlayers = $noAttackingPlayers;
41 $result->worldImmutable = $worldImmutable;
42 $result->showNameTags = $showNameTags;
43 $result->autoJump = $autoJump;
47 public function isNoAttackingMobs() : bool{ return $this->noAttackingMobs; }
49 public function isNoAttackingPlayers() : bool{ return $this->noAttackingPlayers; }
51 public function isWorldImmutable() : bool{ return $this->worldImmutable; }
53 public function isShowNameTags() : bool{ return $this->showNameTags; }
55 public function isAutoJump() : bool{ return $this->autoJump; }
58 $this->noAttackingMobs = $in->getBool();
59 $this->noAttackingPlayers = $in->
getBool();
60 $this->worldImmutable = $in->
getBool();
61 $this->showNameTags = $in->
getBool();
62 $this->autoJump = $in->
getBool();
66 $out->putBool($this->noAttackingMobs);
67 $out->putBool($this->noAttackingPlayers);
68 $out->putBool($this->worldImmutable);
69 $out->putBool($this->showNameTags);
70 $out->putBool($this->autoJump);
74 return $handler->handleUpdateAdventureSettings($this);