Closed ipad54 closed 2 years ago
It is not a bug, they are not implemented. If you want emotes, you just have to redirect the EmotePacket with the flag FLAG_SERVER to all viewers then they will work.
Need broadcast EmotePacket
Use this:
public function onData(\pocketmine\event\server\DataPacketReceiveEvent $event): void{
$pk = $event->getPacket();
if ($pk instanceof \pocketmine\network\mcpe\protocol\EmotePacket) {
var_dump($event->getPlayer()->getId());
var_dump($pk->getEmoteId());
var_dump($pk->getFlags());
\pocketmine\Server::getInstance()->broadcastPacket(\pocketmine\Server::getInstance()->getOnlinePlayers(), \pocketmine\network\mcpe\protocol\EmotePacket::create($event->getPlayer()->getId(), $pk->getEmoteId(), 1 << 0));
}
}
@xxAROX i tryed to make a plugin with this but it didnt work...
<?php
declare(strict_types=1);
namespace LolgonHDYT\test;
use pocketmine\plugin\PluginBase;
use pocketmine\network\mcpe\protocol\EmotePacket;
class Main extends PluginBase{
public function onData(\pocketmine\event\server\DataPacketReceiveEvent $event): void{
$pk = $event->getPacket();
if ($pk instanceof \pocketmine\network\mcpe\protocol\EmotePacket) {
var_dump($event->getPlayer()->getId());
var_dump($pk->getEmoteId());
var_dump($pk->getFlags());
\pocketmine\Server::getInstance()->broadcastPacket(\pocketmine\Server::getInstance()->getOnlinePlayers(), \pocketmine\network\mcpe\protocol\EmotePacket::create($event->getPlayer()->getId(), $pk->getEmoteId(), 1 << 0));
}
}
}
This isn't a plugin support forum.
Sorry...
Until this implemented to pmmp, you can use this plugin instead. https://poggit.pmmp.io/p/DoEmote
Implemented by f0661999717abc3ed5cefceb4c47b732915761f3.
Issue description
if you use emotion, other players will not see it
Steps to reproduce the issue
OS and versions
Plugins
None
Crashdump, backtrace or other files
None