server-master/srcs/WingsAPI.Commands/Entities/WingsEmuIngameCommandContext.cs
2026-02-10 18:21:30 +01:00

36 lines
No EOL
948 B
C#

// WingsEmu
//
// Developed by NosWings Team
using System;
using Qmmands;
using WingsEmu.Game.Networking;
namespace WingsEmu.Commands.Entities
{
public sealed class WingsEmuIngameCommandContext : CommandContext
{
public WingsEmuIngameCommandContext(string message, IClientSession sender, string prefix, CommandService cmds, IServiceProvider services) : base(services)
{
CommandService = cmds;
Message = message;
Player = sender;
Prefix = prefix;
int pos = message.IndexOf(prefix, StringComparison.Ordinal) + 1;
Input = message.Substring(pos);
}
public CommandService CommandService { get; }
public Command Command { get; set; }
public string Message { get; set; }
public string Prefix { get; set; }
public IClientSession Player { get; set; }
public string Input { get; set; }
}
}