mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2024-10-30 05:42:47 +01:00
22 lines
763 B
C#
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."
|
|
};
|
|
}
|
|
}
|