Files
AdamuSw/src/GameLogic/PlugIns/ChatCommands/StartChaosCastleEventChatCommandPlugIn.cs
2026-07-14 19:00:35 +03:00

34 lines
1.4 KiB
C#

// <copyright file="StartChaosCastleEventChatCommandPlugIn.cs" company="MUnique">
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
// </copyright>
namespace MUnique.OpenMU.GameLogic.PlugIns.ChatCommands;
using System.Runtime.InteropServices;
using MUnique.OpenMU.GameLogic.PlugIns.PeriodicTasks;
using MUnique.OpenMU.PlugIns;
/// <summary>
/// A chat command plugin which handles the startcc command.
/// </summary>
[Guid("A990270E-B9C6-4445-BBA9-56367A90D31D")]
[PlugIn]
[Display(Name = nameof(PlugInResources.StartChaosCastleEventChatCommandPlugIn_Name), Description = nameof(PlugInResources.StartChaosCastleEventChatCommandPlugIn_Description), ResourceType = typeof(PlugInResources))]
[ChatCommandHelp(Command, CharacterStatus.GameMaster)]
public class StartChaosCastleEventChatCommandPlugIn : IChatCommandPlugIn
{
private const string Command = "/startcc";
/// <inheritdoc />
public string Key => Command;
/// <inheritdoc/>
public CharacterStatus MinCharacterStatusRequirement => CharacterStatus.GameMaster;
/// <inheritdoc />
public async ValueTask HandleCommandAsync(Player player, string command)
{
var chaosCastle = player.GameContext.PlugInManager.GetStrategy<MiniGameType, IPeriodicMiniGameStartPlugIn>(MiniGameType.ChaosCastle);
chaosCastle?.ForceStart();
}
}