2021-01-03 07:21:15 +00:00
|
|
|
package dev.plex.rank.enums;
|
2020-10-27 20:12:38 +00:00
|
|
|
|
2022-04-10 01:53:27 +00:00
|
|
|
import dev.plex.util.PlexUtils;
|
2022-02-22 04:51:05 +00:00
|
|
|
import lombok.Getter;
|
|
|
|
import lombok.Setter;
|
2022-03-18 01:18:35 +00:00
|
|
|
import net.kyori.adventure.text.Component;
|
|
|
|
import net.kyori.adventure.text.format.NamedTextColor;
|
2022-02-22 04:51:05 +00:00
|
|
|
import org.json.JSONObject;
|
2020-10-27 20:12:38 +00:00
|
|
|
|
2022-02-22 04:51:05 +00:00
|
|
|
@Getter
|
2020-10-27 20:12:38 +00:00
|
|
|
public enum Title
|
|
|
|
{
|
2022-03-19 19:37:11 +00:00
|
|
|
MASTER_BUILDER(0, "<aqua>a <dark_aqua>Master Builder<reset>", "Master Builder", "<dark_gray>[<dark_aqua>Master Builder<dark_gray>]", NamedTextColor.DARK_AQUA),
|
|
|
|
DEV(1, "<aqua>a <dark_purple>Developer<reset>", "Developer", "<dark_gray>[<dark_purple>Developer<dark_gray>]", NamedTextColor.DARK_PURPLE),
|
|
|
|
OWNER(2, "<aqua>an <blue>Owner<reset>", "Owner", "<dark_gray>[<blue>Owner<dark_gray>]", NamedTextColor.BLUE);
|
2020-10-27 20:12:38 +00:00
|
|
|
|
2022-02-22 04:51:05 +00:00
|
|
|
private final int level;
|
2022-08-02 12:08:52 +00:00
|
|
|
@Getter
|
|
|
|
private final NamedTextColor color;
|
2022-02-22 04:51:05 +00:00
|
|
|
@Setter
|
2022-03-25 05:54:21 +00:00
|
|
|
private String loginMessage;
|
2022-02-22 04:51:05 +00:00
|
|
|
@Setter
|
2022-03-25 05:54:21 +00:00
|
|
|
private String readable;
|
2022-02-22 04:51:05 +00:00
|
|
|
@Setter
|
2022-03-25 05:54:21 +00:00
|
|
|
private String prefix;
|
2020-10-27 20:12:38 +00:00
|
|
|
|
2022-03-18 01:18:35 +00:00
|
|
|
Title(int level, String loginMessage, String readable, String prefix, NamedTextColor color)
|
2020-10-27 20:12:38 +00:00
|
|
|
{
|
|
|
|
this.level = level;
|
2022-02-22 04:51:05 +00:00
|
|
|
this.loginMessage = loginMessage;
|
2022-02-04 04:49:05 +00:00
|
|
|
this.readable = readable;
|
2020-10-27 20:12:38 +00:00
|
|
|
this.prefix = prefix;
|
2022-03-18 01:18:35 +00:00
|
|
|
this.color = color;
|
2020-10-27 20:12:38 +00:00
|
|
|
}
|
2022-02-22 04:51:05 +00:00
|
|
|
|
2022-03-18 01:18:35 +00:00
|
|
|
public Component getPrefix()
|
2022-02-25 08:59:48 +00:00
|
|
|
{
|
2022-04-10 01:53:27 +00:00
|
|
|
return PlexUtils.mmDeserialize(this.prefix);
|
2022-02-25 08:59:48 +00:00
|
|
|
}
|
|
|
|
|
2022-02-22 04:51:05 +00:00
|
|
|
public JSONObject toJSON()
|
|
|
|
{
|
|
|
|
JSONObject object = new JSONObject();
|
|
|
|
object.put("prefix", this.prefix);
|
|
|
|
object.put("loginMessage", this.loginMessage);
|
|
|
|
return new JSONObject().put(this.name(), object);
|
|
|
|
}
|
2020-10-27 20:12:38 +00:00
|
|
|
}
|