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

21 lines
705 B
C#

namespace Phantom.Common.Data.Replies;
public enum InstanceActionFailure : byte {
AgentDoesNotExist,
AgentShuttingDown,
AgentIsNotResponding,
InstanceDoesNotExist
}
public static class InstanceActionFailureExtensions {
public static string ToSentence(this InstanceActionFailure failure) {
return failure switch {
InstanceActionFailure.AgentDoesNotExist => "Agent does not exist.",
InstanceActionFailure.AgentShuttingDown => "Agent is shutting down.",
InstanceActionFailure.AgentIsNotResponding => "Agent is not responding.",
InstanceActionFailure.InstanceDoesNotExist => "Instance does not exist.",
_ => "Unknown error."
};
}
}