Пример #1
0
        public override void DespawnFromPlayer(Player player)
        {
            {
                Player fake = new Player(null, null, 0)
                {
                    ClientUuid = Uuid,
                    EntityId   = EntityId,
                    NameTag    = NameTag ?? Name,
                    Skin       = Skin
                };

                McpePlayerList playerList = McpePlayerList.CreateObject();
                playerList.records = new PlayerRemoveRecords {
                    fake
                };
                player.SendPackage(playerList);
            }

            McpeRemovePlayer mcpeRemovePlayer = McpeRemovePlayer.CreateObject();

            mcpeRemovePlayer.entityId   = EntityId;
            mcpeRemovePlayer.clientUuid = Uuid;
            player.SendPackage(mcpeRemovePlayer);
        }
Пример #2
0
        public override void DespawnFromPlayers(Player[] players)
        {
            {
                Player fake = new Player(null, null)
                {
                    ClientUuid = Uuid,
                    EntityId   = EntityId,
                    NameTag    = NameTag ?? Name,
                    Skin       = Skin
                };

                McpePlayerList playerList = McpePlayerList.CreateObject();
                playerList.records = new PlayerRemoveRecords {
                    fake
                };
                Level.RelayBroadcast(players, playerList);
            }

            McpeRemovePlayer mcpeRemovePlayer = McpeRemovePlayer.CreateObject();

            mcpeRemovePlayer.entityId   = EntityId;
            mcpeRemovePlayer.clientUuid = Uuid;
            Level.RelayBroadcast(players, mcpeRemovePlayer);
        }