Esempio n. 1
0
        public MainHands MainHand;            //Varint Enum

        public override void Read(byte[] array)
        {
            McString.TryParse(ref array, out Locale);
            McUnsignedByte.TryParse(ref array, out ViewDistance);
            McVarint.TryParse(ref array, out int chatMode);
            ChatMode = (ChatModes)chatMode;
            McBoolean.TryParse(ref array, out ChatColors);
            McUnsignedByte.TryParse(ref array, out DisplayedSkinParts);
            McVarint.TryParse(ref array, out int mainHand);
            MainHand = (MainHands)mainHand;
        }
Esempio n. 2
0
        public override void Use(Player p, string message, CommandData data)
        {
            if (message.Length > 0)
            {
                ChatModes.MessageAdmins(p, message); return;
            }

            p.adminchat = !p.adminchat;
            if (p.adminchat)
            {
                p.Message("All messages will now be sent to Admins only");
            }
            else
            {
                p.Message("Admin chat turned off");
            }
        }
Esempio n. 3
0
        public override void Use(Player p, string message)
        {
            if (message != "")
            {
                ChatModes.MessageOps(p, message); return;
            }

            p.opchat = !p.opchat;
            if (p.opchat)
            {
                Player.Message(p, "All messages will now be sent to OPs only");
            }
            else
            {
                Player.Message(p, "OP chat turned off");
            }
        }
Esempio n. 4
0
        void pl_BtnMessage_Click(object sender, EventArgs e)
        {
            if (curPlayer == null)
            {
                NoPlayerSelected(); return;
            }

            string text = pl_txtMessage.Text.Trim();

            if (text.Length == 0)
            {
                Players_AppendStatus("No message to send"); return;
            }

            ChatModes.MessageDirect(Player.Console, curPlayer, pl_txtMessage.Text);
            Players_AppendStatus("Sent player message: " + pl_txtMessage.Text);
            pl_txtMessage.Text = "";
        }
Esempio n. 5
0
        public static void HandleChat(string text)
        {
            if (text != null)
            {
                text = text.Trim();
            }
            if (String.IsNullOrEmpty(text))
            {
                return;
            }
            if (ChatModes.Handle(null, text))
            {
                return;
            }

            Chat.MessageGlobal("Console [&a{0}%S]:&f {1}", ServerConfig.ConsoleName, text);
            Server.IRC.Say("Console [&a" + ServerConfig.ConsoleName + "%S]: " + text);
            Logger.Log(LogType.PlayerChat, "(console): " + text);
        }
Esempio n. 6
0
        public static void HandleChat(string text)
        {
            if (text != null)
            {
                text = text.Trim();
            }
            if (String.IsNullOrEmpty(text))
            {
                return;
            }

            Player p = Player.Console;

            if (ChatModes.Handle(p, text))
            {
                return;
            }

            Chat.MessageChat(ChatScope.Global, p, "λFULL: &f" + text, null, null, true);
        }
Esempio n. 7
0
        public static void HandleChat(string text, Action <string> output)
        {
            if (text != null)
            {
                text = text.Trim();
            }
            if (String.IsNullOrEmpty(text))
            {
                return;
            }
            if (ChatModes.Handle(null, text))
            {
                return;
            }

            Chat.MessageAll("Console [&a{0}%S]:&f {1}", Server.ZallState, text);
            Server.IRC.Say("Console [&a" + Server.ZallState + "%S]: " + text);
            Server.s.Log("(Console): " + text, true);
            output("<CONSOLE>: " + text);
        }