Example #1
0
        public void SendEnvColor(byte type, string hex)
        {
            ColorDesc c;

            if (Colors.TryParseHex(hex, out c))
            {
                Send(Packet.EnvColor(type, c.R, c.G, c.B));
            }
            else
            {
                Send(Packet.EnvColor(type, -1, -1, -1));
            }
        }
Example #2
0
        public void Show(Player p)
        {
            if (!p.Supports(CpeExt.SelectionCuboid) || !Shows)
            {
                return;
            }

            ColorDesc col; Colors.TryParseHex(Config.ShowColor, out col);
            Vec3U16   min = new Vec3U16(MinX, MinY, MinZ);
            Vec3U16   max = new Vec3U16((ushort)(MaxX + 1), (ushort)(MaxY + 1), (ushort)(MaxZ + 1));

            p.Send(Packet.MakeSelection(ID, Config.Name, min, max,
                                        col.R, col.G, col.B, (byte)Config.ShowAlpha, p.hasCP437));
        }