private void PlayerOnTicking(object sender, PlayerEventArgs playerEventArgs)
        {
            {
                var player = (PlayerMob)sender;
                if (player.Level.TickTime % 4 != 0)
                {
                    return;
                }
            }

            using var bmpScreenCapture = new Bitmap(2150, 1519);
            using (var g = Graphics.FromImage(bmpScreenCapture))
            {
                g.CopyFromScreen(1669, 90, 0, 0, bmpScreenCapture.Size, CopyPixelOperation.SourceCopy);
            }

            using var srcBitmap = new Bitmap(bmpScreenCapture, new Size((_width) * 62, (_height) * 62));
            foreach (var mobCoord in mobs)
            {
                PlayerMob mob = mobCoord.Value;
                mob.AddToPlayerList();

                int offsetx = (mobCoord.Key.Item1) * 62;
                int offsety = (_height - mobCoord.Key.Item2 - 1) * 62;
                using Bitmap croppedImage = NiceLobbyPlugin.CropImage(srcBitmap, new Rectangle(offsetx, offsety, 62, 62));
                using Bitmap textureImage = new Bitmap(64, 64);
                var gfx = Graphics.FromImage(textureImage);
                gfx.FillRectangle(Brushes.Black, new Rectangle(0, 0, 64, 64));
                gfx.DrawImageUnscaled(croppedImage, new Point(1, 1));
                //var bytes = NiceLobbyPlugin.BitmapToBytes(textureImage, true);
                var stream = new MemoryStream();
                textureImage.Save(stream, ImageFormat.MemoryBmp);
                var bytes = stream.ToArray();

                string oldSkinId = mob.Skin.SkinId;
                var    skin      = (Skin)mob.Skin.Clone();
                skin.Data   = bytes;
                skin.SkinId = "testing" + new Guid();
                mob.Skin    = skin;

                var updateSkin = McpePlayerSkin.CreateObject();
                updateSkin.uuid        = mob.ClientUuid;
                updateSkin.oldSkinName = oldSkinId;
                updateSkin.skinName    = mob.Skin.SkinId;
                updateSkin.skin        = mob.Skin;
                mob.Level.RelayBroadcast(updateSkin);

                mob.RemoveFromPlayerList();
            }
        }
        private void PlayerOnTicking(object sender, PlayerEventArgs playerEventArgs)
        {
            {
                var player = (PlayerMob)sender;
                if (player.Level.TickTime % 4 != 0)
                {
                    return;
                }
            }

            using (Bitmap bmpScreenCapture = new Bitmap(1118, 801))
            {
                using (Graphics g = Graphics.FromImage(bmpScreenCapture))
                {
                    g.CopyFromScreen(620, 101, 0, 0, bmpScreenCapture.Size, CopyPixelOperation.SourceCopy);
                }

                using (Bitmap srcBitmap = new Bitmap(bmpScreenCapture, new Size((_width) * 64, (_height) * 64)))
                {
                    foreach (var mobCoord in mobs)
                    {
                        PlayerMob mob = mobCoord.Value;
                        mob.AddToPlayerList();

                        int offsetx = (mobCoord.Key.Item1) * 64;
                        int offsety = (_height - mobCoord.Key.Item2 - 1) * 64;
                        using (Bitmap bitmap = NiceLobbyPlugin.CropImage(srcBitmap, new Rectangle(offsetx, offsety, 64, 64)))
                        {
                            var bytes = NiceLobbyPlugin.BitmapToBytes(bitmap, true);

                            var skin = mob.Skin;
                            skin.SkinData = bytes;

                            McpePlayerSkin updateSkin = McpePlayerSkin.CreateObject();
                            updateSkin.uuid          = mob.ClientUuid;
                            updateSkin.skinId        = skin.SkinId + new Guid();
                            updateSkin.skinData      = skin.SkinData;
                            updateSkin.capeData      = skin.CapeData;
                            updateSkin.geometryModel = skin.SkinGeometryName;
                            updateSkin.geometryData  = skin.SkinGeometry;
                            mob.Level.RelayBroadcast(updateSkin);
                        }

                        mob.RemoveFromPlayerList();
                    }
                }
            }
        }