internal static void OnPlayerChat(Player player, byte requestId, byte type, string target, string message) { if (message.StartsWith("//")) { // Message is a command // TODO : This should be better parsed and // requires permission checks message = message.TrimStart('/'); // pars[0] = Command // pars[1..n] = parameters string[] pars = message.Split(' '); switch (pars[0]) { case "item": break; case "monster": int mobId = Int32.Parse(pars[1]); Monster.SpawnMonster(mobId, player.Position); break; case "set": break; } } else { // It's a common message ClientPacketHandler.send_Chat(player, type, message, target); } }