pmmp / PocketMine-MP

A server software for Minecraft: Bedrock Edition in PHP
https://pmmp.io
GNU Lesser General Public License v3.0
3.26k stars 1.54k forks source link

Emotes are not implemented #3645

Closed ipad54 closed 2 years ago

ipad54 commented 4 years ago

Issue description

if you use emotion, other players will not see it

Steps to reproduce the issue

  1. Use emotion

OS and versions

Plugins

None

Crashdump, backtrace or other files

None

TwistedAsylumMC commented 4 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.

Govdim commented 4 years ago

Need broadcast EmotePacket

xxAROX commented 4 years ago

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));
        }
    }
eqMFqfFd commented 4 years ago

https://github.com/Seyz123/Emotes

CallMeYuuuu commented 4 years ago

@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));
        }
    }
}
dktapps commented 4 years ago

This isn't a plugin support forum.

CallMeYuuuu commented 4 years ago

Sorry...

twk1024 commented 4 years ago

Until this implemented to pmmp, you can use this plugin instead. https://poggit.pmmp.io/p/DoEmote

dktapps commented 2 years ago

Implemented by f0661999717abc3ed5cefceb4c47b732915761f3.