Add flag info header and footer

This commit is contained in:
Alexander Söderberg 2020-02-18 13:57:03 +01:00
parent d9f2a69f83
commit f7d2107d4e
2 changed files with 5 additions and 0 deletions

View File

@ -365,6 +365,7 @@ import java.util.Map;
}
final PlotFlag<?, ?> plotFlag = getFlag(player, args[0]);
if (plotFlag != null) {
Captions.FLAG_INFO_HEADER.send(player);
// Flag name
new PlotMessage(Captions.FLAG_INFO_NAME.getTranslated())
.color(Captions.FLAG_INFO_COLOR_KEY.getTranslated()).text(plotFlag.getName())
@ -391,6 +392,8 @@ import java.util.Map;
new PlotMessage(Captions.FLAG_INFO_DEFAULT_VALUE.getTranslated())
.color(Captions.FLAG_INFO_COLOR_KEY.getTranslated()).text(defaultValue)
.color(Captions.FLAG_INFO_COLOR_VALUE.getTranslated()).send(player);
// Footer
Captions.FLAG_INFO_FOOTER.send(player);
}
}

View File

@ -536,6 +536,8 @@ public enum Captions implements Caption {
FLAG_PARSE_EXCEPTION("$2Failed to parse flag '%s', value '%s': %s", "Flag"),
//</editor-fold>
//<editor-fold desc="Flag">
FLAG_INFO_HEADER("$3&m---------&r $1Plot² Flags $3&m---------", "Flag"),
FLAG_INFO_FOOTER("$3&m---------&r $1Plot² Flags $3&m---------", "Flag"),
FLAG_INFO_COLOR_KEY("$1", "Flag"),
FLAG_INFO_COLOR_VALUE("$2", "Flag"),
FLAG_INFO_NAME("Name: ", "Flag"),