mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
More json fixes
This commit is contained in:
parent
7cd1e8ea76
commit
c6a368d6f2
@ -45,7 +45,7 @@ import net.kyori.adventure.text.minimessage.Template;
|
|||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
|
||||||
@CommandDeclaration(usage = "/plot download [schematic|world]",
|
@CommandDeclaration(usage = "/plot download [schematic | world]",
|
||||||
command = "download",
|
command = "download",
|
||||||
aliases = {"dl"},
|
aliases = {"dl"},
|
||||||
category = CommandCategory.SCHEMATIC,
|
category = CommandCategory.SCHEMATIC,
|
||||||
@ -111,7 +111,9 @@ public class Download extends SubCommand {
|
|||||||
player.sendMessage(TranslatableCaption.of("web.generating_link_failed"));
|
player.sendMessage(TranslatableCaption.of("web.generating_link_failed"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
player.sendMessage(StaticCaption.of(url.toString())
|
player.sendMessage(
|
||||||
|
TranslatableCaption.of("web.generation_link_success"),
|
||||||
|
Template.of("url", url.toString())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -49,6 +49,7 @@ import java.util.concurrent.TimeoutException;
|
|||||||
category = CommandCategory.CLAIMING,
|
category = CommandCategory.CLAIMING,
|
||||||
usage = "/plot grant <check | add> [player]",
|
usage = "/plot grant <check | add> [player]",
|
||||||
permission = "plots.grant",
|
permission = "plots.grant",
|
||||||
|
description = "Manage plot grants.",
|
||||||
requiredType = RequiredType.NONE)
|
requiredType = RequiredType.NONE)
|
||||||
public class Grant extends Command {
|
public class Grant extends Command {
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ import net.kyori.adventure.text.minimessage.Template;
|
|||||||
@CommandDeclaration(command = "info",
|
@CommandDeclaration(command = "info",
|
||||||
aliases = "i",
|
aliases = "i",
|
||||||
description = "Display plot info",
|
description = "Display plot info",
|
||||||
usage = "/plot info <id> [-f, to force info]",
|
usage = "/plot info <id> [-f to force info]",
|
||||||
category = CommandCategory.INFO)
|
category = CommandCategory.INFO)
|
||||||
public class Info extends SubCommand {
|
public class Info extends SubCommand {
|
||||||
|
|
||||||
|
@ -115,16 +115,16 @@ public class Music extends SubCommand {
|
|||||||
int index = 0;
|
int index = 0;
|
||||||
|
|
||||||
for (final String disc : DISCS) {
|
for (final String disc : DISCS) {
|
||||||
final String name = String.format("<reset><gold>%s</gold>", disc);
|
final String name = String.format("<gold>%s</gold>", disc);
|
||||||
final String[] lore = {"<reset><green>Click to play!</green>"};
|
final String[] lore = {"<green>Click to play!</green>"};
|
||||||
final PlotItemStack item = new PlotItemStack(disc, 1, name, lore);
|
final PlotItemStack item = new PlotItemStack(disc, 1, name, lore);
|
||||||
inv.setItem(index++, item);
|
inv.setItem(index++, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Always add the cancel button
|
// Always add the cancel button
|
||||||
// if (player.getMeta("music") != null) {
|
// if (player.getMeta("music") != null) {
|
||||||
String name = "<reset><gold>Cancel music</gold>";
|
String name = "<gold>Cancel music</gold>";
|
||||||
String[] lore = {"<reset><red>Click to cancel!<reset>"};
|
String[] lore = {"<red>Click to cancel!<reset>"};
|
||||||
inv.setItem(index, new PlotItemStack("bedrock", 1, name, lore));
|
inv.setItem(index, new PlotItemStack("bedrock", 1, name, lore));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ public class ComponentPresetManager {
|
|||||||
} else {
|
} else {
|
||||||
final List<ComponentPreset> defaultPreset = Collections.singletonList(
|
final List<ComponentPreset> defaultPreset = Collections.singletonList(
|
||||||
new ComponentPreset(ClassicPlotManagerComponent.FLOOR, "##wool", 0, "", "&6D&ai&cs&ec&bo &2F&3l&do&9o&4r",
|
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()));
|
yamlConfiguration.set("presets", defaultPreset.stream().map(ComponentPreset::serialize).collect(Collectors.toList()));
|
||||||
try {
|
try {
|
||||||
yamlConfiguration.save(file);
|
yamlConfiguration.save(file);
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
"web.generating_link": "<prefix><gold>Processing plot...</gold>",
|
"web.generating_link": "<prefix><gold>Processing plot...</gold>",
|
||||||
"web.generating_link_failed": "<prefix><red>Failed to generate download link!</red>",
|
"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.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_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>",
|
"web.load_failed": "<prefix><red>Failed to load schematic.</red>",
|
||||||
@ -441,7 +442,7 @@
|
|||||||
"signs.owner_sign_line_4": "<dark_gray>Claimed</dark_gray>",
|
"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_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_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_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",
|
"help.help_item": "<gold><usage> <gray>[</gray><gold><alias></gray>]</gray>\n <dark_gray>- </dark_gray><gray><desc></gray>\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user