From f7d2107d4eb241a208400fb4553ac233100c0309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= Date: Tue, 18 Feb 2020 13:57:03 +0100 Subject: [PATCH] Add flag info header and footer --- .../plotsquared/plot/commands/FlagCommand.java | 3 +++ .../intellectualsites/plotsquared/plot/config/Captions.java | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/FlagCommand.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/FlagCommand.java index aace9d317..71f88e359 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/FlagCommand.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/FlagCommand.java @@ -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); } } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java index 205fa24d6..37b21a4bc 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java @@ -536,6 +536,8 @@ public enum Captions implements Caption { FLAG_PARSE_EXCEPTION("$2Failed to parse flag '%s', value '%s': %s", "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"),