mirror of
https://github.com/TotalFreedomMC/TFGuilds.git
synced 2024-05-11 23:21:25 +00:00
27859eddac
& add codestyle to project for proper code formatting
41 lines
796 B
Java
41 lines
796 B
Java
package me.totalfreedom.tfguilds.guild;
|
|
|
|
import lombok.Getter;
|
|
|
|
public enum GuildState
|
|
{
|
|
OPEN("Open"),
|
|
INVITE_ONLY("Invite-only"),
|
|
CLOSED("Closed");
|
|
|
|
@Getter
|
|
private final String display;
|
|
|
|
GuildState(String display)
|
|
{
|
|
this.display = display;
|
|
}
|
|
|
|
public static GuildState findState(String string)
|
|
{
|
|
if (string == null)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
switch (string.toLowerCase())
|
|
{
|
|
case "open":
|
|
case "opened":
|
|
return OPEN;
|
|
case "invite":
|
|
case "inviteonly":
|
|
case "invite_only":
|
|
return INVITE_ONLY;
|
|
case "closed":
|
|
case "close":
|
|
return CLOSED;
|
|
}
|
|
return null;
|
|
}
|
|
} |