More json fixes

This commit is contained in:
N0tMyFaultOG 2020-08-17 13:24:15 +02:00
parent 7cd1e8ea76
commit c6a368d6f2
6 changed files with 13 additions and 9 deletions

View File

@ -111,7 +111,9 @@ public class Download extends SubCommand {
player.sendMessage(TranslatableCaption.of("web.generating_link_failed"));
return;
}
player.sendMessage(StaticCaption.of(url.toString())
player.sendMessage(
TranslatableCaption.of("web.generation_link_success"),
Template.of("url", url.toString())
);
}
});

View File

@ -49,6 +49,7 @@ import java.util.concurrent.TimeoutException;
category = CommandCategory.CLAIMING,
usage = "/plot grant <check | add> [player]",
permission = "plots.grant",
description = "Manage plot grants.",
requiredType = RequiredType.NONE)
public class Grant extends Command {

View File

@ -39,7 +39,7 @@ import net.kyori.adventure.text.minimessage.Template;
@CommandDeclaration(command = "info",
aliases = "i",
description = "Display plot info",
usage = "/plot info <id> [-f, to force info]",
usage = "/plot info <id> [-f to force info]",
category = CommandCategory.INFO)
public class Info extends SubCommand {

View File

@ -115,16 +115,16 @@ public class Music extends SubCommand {
int index = 0;
for (final String disc : DISCS) {
final String name = String.format("<reset><gold>%s</gold>", disc);
final String[] lore = {"<reset><green>Click to play!</green>"};
final String name = String.format("<gold>%s</gold>", disc);
final String[] lore = {"<green>Click to play!</green>"};
final PlotItemStack item = new PlotItemStack(disc, 1, name, lore);
inv.setItem(index++, item);
}
// Always add the cancel button
// if (player.getMeta("music") != null) {
String name = "<reset><gold>Cancel music</gold>";
String[] lore = {"<reset><red>Click to cancel!<reset>"};
String name = "<gold>Cancel music</gold>";
String[] lore = {"<red>Click to cancel!<reset>"};
inv.setItem(index, new PlotItemStack("bedrock", 1, name, lore));
// }

View File

@ -110,7 +110,7 @@ public class ComponentPresetManager {
} else {
final List<ComponentPreset> defaultPreset = Collections.singletonList(
new ComponentPreset(ClassicPlotManagerComponent.FLOOR, "##wool", 0, "", "&6D&ai&cs&ec&bo &2F&3l&do&9o&4r",
Arrays.asList("&6Spice up your plot floor"), ItemTypes.YELLOW_WOOL));
Arrays.asList("<gold>Spice up your plot floor</gold>"), ItemTypes.YELLOW_WOOL));
yamlConfiguration.set("presets", defaultPreset.stream().map(ComponentPreset::serialize).collect(Collectors.toList()));
try {
yamlConfiguration.save(file);

View File

@ -25,6 +25,7 @@
"web.generating_link": "<prefix><gold>Processing plot...</gold>",
"web.generating_link_failed": "<prefix><red>Failed to generate download link!</red>",
"web.generation_link_success": "<click:open_url:<url>><url></click>",
"web.save_failed": "<prefix><red>Failed to save.</red>",
"web.load_null": "<prefix><gray>Please use </gray><dark_aqua><command> </dark_aqua><gray>to get a list of schematics.</gray>",
"web.load_failed": "<prefix><red>Failed to load schematic.</red>",
@ -441,7 +442,7 @@
"signs.owner_sign_line_4": "<dark_gray>Claimed</dark_gray>",
"help.help_header": "<dark_gray><strikethrough>---------<reset> <gold>PlotSquared Help </gold><dark_gray><strikethrough>---------<reset>",
"help.help_page_header": "<gold>Category: </gold><gray><category>,</gray><gold> Page: </gold><gray><current></gray><dark_gray>/</dark_gray><gray><max></gray>",
"help.help_page_header": "\n<gold>Category: </gold><gray><category>,</gray><gold> Page: </gold><gray><current></gray><dark_gray>/</dark_gray><gray><max></gray>\n",
"help.help_footer": "<dark_gray><strikethrough>---------<reset> <gold>PlotSquared Help </gold><dark_gray><strikethrough>---------<reset>",
"help.help_info_item": "<gold>/plot help <gray><category> </gray><dark_gray>- </dark_gray><gray><category_desc></gray>",
"help.help_item": "<gold><usage> <gray>[</gray><gold><alias></gray>]</gray>\n <dark_gray>- </dark_gray><gray><desc></gray>\n",