From 4eaf00ae0026919e6737bae10d8ab49404fb2528 Mon Sep 17 00:00:00 2001 From: Florian <38558911+xxFLORII@users.noreply.github.com> Date: Thu, 16 Feb 2023 13:00:38 +0100 Subject: [PATCH] support latest protocol changes (#137) --- plugin.yml | 2 +- src/jp/mcbe/fuyutsuki/Texter/text/FloatingText.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin.yml b/plugin.yml index c4d91cc..6ee5a58 100644 --- a/plugin.yml +++ b/plugin.yml @@ -2,7 +2,7 @@ name: Texter prefix: Texter main: jp\mcbe\fuyutsuki\Texter\Main version: 4.1.8 -api: 4.10.0 +api: 4.14.0 softdepend: # aieuo/Mineflow - Mineflow # >= 2.0 diff --git a/src/jp/mcbe/fuyutsuki/Texter/text/FloatingText.php b/src/jp/mcbe/fuyutsuki/Texter/text/FloatingText.php index 3fb3894..a66f83c 100644 --- a/src/jp/mcbe/fuyutsuki/Texter/text/FloatingText.php +++ b/src/jp/mcbe/fuyutsuki/Texter/text/FloatingText.php @@ -19,6 +19,7 @@ use pocketmine\network\mcpe\protocol\PlayerListPacket; use pocketmine\network\mcpe\protocol\RemoveActorPacket; use pocketmine\network\mcpe\protocol\SetActorDataPacket; +use pocketmine\network\mcpe\protocol\types\AbilitiesData; use pocketmine\network\mcpe\protocol\types\command\CommandPermissions; use pocketmine\network\mcpe\protocol\types\DeviceOS; use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataFlags; @@ -143,7 +144,7 @@ public function asPackets(Player $player, SendType $type): array { EntityMetadataProperties::SCALE => new FloatMetadataProperty(0.0), ], new PropertySyncData([], []), - UpdateAbilitiesPacket::create(CommandPermissions::NORMAL, PlayerPermissions::VISITOR, $this->actorRuntimeId, []), + UpdateAbilitiesPacket::create(new AbilitiesData(CommandPermissions::NORMAL, PlayerPermissions::VISITOR, $this->actorRuntimeId, [])), [], "", DeviceOS::UNKNOWN