1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2024-10-17 12:42:51 +02:00
Minecraft-Phantom-Panel/Common/Phantom.Common.Data/Replies/SendCommandToInstanceResult.cs

22 lines
763 B
C#

namespace Phantom.Common.Data.Replies;
public enum SendCommandToInstanceResult {
Success,
InstanceDoesNotExist,
AgentShuttingDown,
AgentCommunicationError,
UnknownError
}
public static class SendCommandToInstanceResultExtensions {
public static string ToSentence(this SendCommandToInstanceResult reason) {
return reason switch {
SendCommandToInstanceResult.Success => "Command sent.",
SendCommandToInstanceResult.InstanceDoesNotExist => "Instance does not exist.",
SendCommandToInstanceResult.AgentShuttingDown => "Agent is shutting down.",
SendCommandToInstanceResult.AgentCommunicationError => "Agent did not reply in time.",
_ => "Unknown error."
};
}
}