URL update

This commit is contained in:
nulli0n committed 2024-12-15 18:53:46 +05:00
1 parent 86f2899c2b
commit 0f4333e63b
8 files changed
+33 -16

No files matched your search

@@ -58,7 +58,7 @@ public class CoreConfig {
"Allows to use legacy color codes (such as '&7', '&l', etc.) in plugin configurations.",
"This setting exist for backwards compatibility only! There are NO GUARANTEES that it will persist for future updates!",
"You should NOT use it unless you need to add support for your custom language configurations & translations with legacy codes.",
"You should migrate to new text format as soon as possible: " + Placeholders.WIKI_TEXT_URL
"You should migrate to new text format as soon as possible: " + Placeholders.URL_WIKI_TEXT
);
// public static final ConfigValue<Boolean> RESPECT_PLAYER_DISPLAYNAME = ConfigValue.create("Engine.Respect_Player_DisplayName",
@@ -7,6 +7,8 @@ public class CorePerms {
public static final UniPermission COMMAND_RELOAD = new UniPermission("nightcore.command.reload");
public static final UniPermission COMMAND_CHECK_PERM = new UniPermission("nightcore.command.checkperm");
public static final UniPermission COMMAND_DUMP_ITEM = new UniPermission("nightcore.command.dumpitem");
@Deprecated
public static final UniPermission COMMAND_FLAGS = new UniPermission("nightcore.command.flags");
}
@@ -149,7 +149,7 @@ public class MenuLoader {
"=".repeat(20) + " [SECTION] CONTENT " + "=".repeat(20),
"You can freely edit items in this section as you wish (add, remove, modify items).",
"> [Item] : Section | Item to display.",
" [*] Navigate to " + Placeholders.WIKI_ITEMS_URL + " for a list of available options.",
" [*] Navigate to " + Placeholders.URL_WIKI_ITEMS + " for a list of available options.",
"> [Priority] : Integer | Item priority. Higher values will override other item(s) in the same slot(s).",
"> [Slots] : Int Array | Item slots, starts from 0. Split with commas.",
" Slots: '0,4,9,10'",
@@ -14,10 +14,21 @@ import java.util.function.UnaryOperator;
public class Placeholders {
public static final String GITHUB_URL = "https://github.com/nulli0n/nightcore-spigot";
public static final String WIKI_MAIN_URL = GITHUB_URL + "/wiki/";
public static final String WIKI_ITEMS_URL = WIKI_MAIN_URL + "ItemStack-Options";
public static final String WIKI_TEXT_URL = WIKI_MAIN_URL + "Text-Formation";
public static final String WIKI_LANG_URL = WIKI_MAIN_URL + "Language-Formation";
public static final String URL_WIKI = "http://nightexpressdev.com/nightcore/";
public static final String URL_WIKI_ITEMS = URL_WIKI + "configuration/item-formation/";
public static final String URL_WIKI_TEXT = URL_WIKI + "configuration/text-formation/";
public static final String URL_WIKI_LANG = URL_WIKI + "configuration/language/";
public static final String URL_WIKI_NUMBER = URL_WIKI + "configuration/number-formation/";
@Deprecated
public static final String WIKI_MAIN_URL = URL_WIKI;
@Deprecated
public static final String WIKI_ITEMS_URL = URL_WIKI_ITEMS;
@Deprecated
public static final String WIKI_TEXT_URL = URL_WIKI_TEXT;
@Deprecated
public static final String WIKI_LANG_URL = URL_WIKI_LANG;
public static final String DEFAULT = "default";
public static final String NONE = "none";
@@ -29,11 +29,11 @@ public class Tags {
public static final ShortHexColorTag HEX_COLOR_SHORT = new ShortHexColorTag();
public static final TranslationTag TRANSLATE = new TranslationTag();
public static final FontStyleTag BOLD = new FontStyleTag("b", FontStyleTag.Style.BOLD);
public static final FontStyleTag ITALIC = new FontStyleTag("i", FontStyleTag.Style.ITALIC);
public static final FontStyleTag OBFUSCATED = new FontStyleTag("o", FontStyleTag.Style.OBFUSCATED);
public static final FontStyleTag STRIKETHROUGH = new FontStyleTag("s", FontStyleTag.Style.STRIKETHROUGH);
public static final FontStyleTag UNDERLINED = new FontStyleTag("u", FontStyleTag.Style.UNDERLINED);
public static final FontStyleTag BOLD = new FontStyleTag("b", new String[]{"bold"}, FontStyleTag.Style.BOLD);
public static final FontStyleTag ITALIC = new FontStyleTag("i", new String[]{"em", "italic"}, FontStyleTag.Style.ITALIC);
public static final FontStyleTag OBFUSCATED = new FontStyleTag("o", new String[]{"obfuscated", "obf"}, FontStyleTag.Style.OBFUSCATED);
public static final FontStyleTag STRIKETHROUGH = new FontStyleTag("s", new String[]{"strikethrough", "st"}, FontStyleTag.Style.STRIKETHROUGH);
public static final FontStyleTag UNDERLINED = new FontStyleTag("u", new String[]{"underlined"}, FontStyleTag.Style.UNDERLINED);
public static final ColorTag BLACK = new ColorTag("black", "#000000");
public static final ColorTag WHITE = new ColorTag("white", "#ffffff");
@@ -14,18 +14,22 @@ public class FontStyleTag extends SimpleTag implements Decorator {
private final Style style;
public FontStyleTag(@NotNull String name, @NotNull Style style) {
super(name);
this(name, new String[0], style);
}
public FontStyleTag(@NotNull String name, String[] aliases, @NotNull Style style) {
super(name, aliases);
this.style = style;
}
@NotNull
public Style getStyle() {
return style;
return this.style;
}
@Override
public void decorate(@NotNull BaseComponent component) {
switch (this.getStyle()) {
switch (this.style) {
case BOLD -> component.setBold(true);
case ITALIC -> component.setItalic(true);
case OBFUSCATED -> component.setObfuscated(true);
@@ -14,7 +14,7 @@ public class HexColorTag extends Tag implements ContentTag {
public static final String NAME = "color";
public HexColorTag() {
super(NAME, new String[]{"c"});
super(NAME, new String[]{"colour", "c"});
}
@Override
@@ -7,6 +7,6 @@ public class TranslationTag extends Tag {
public static final String NAME = "translation";
public TranslationTag() {
super(NAME, new String[]{"tr", "lang"});
super(NAME, new String[]{"tr", "lang", "translate"});
}
}