mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Make the plot jukebox gui translatable
Fixes https://github.com/IntellectualSites/PlotSquared-Translations/issues/2
This commit is contained in:
parent
9344e1ca79
commit
3d7c191d1c
@ -85,7 +85,7 @@ public class Music extends SubCommand {
|
|||||||
);
|
);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
PlotInventory inv = new PlotInventory(this.inventoryUtil, player, 2, "Plot Jukebox") {
|
PlotInventory inv = new PlotInventory(this.inventoryUtil, player, 2, TranslatableCaption.of("plotjukebox.jukebox_header").getComponent(player)) {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(int index) {
|
public boolean onClick(int index) {
|
||||||
PlotItemStack item = getItem(index);
|
PlotItemStack item = getItem(index);
|
||||||
@ -132,15 +132,15 @@ public class Music extends SubCommand {
|
|||||||
|
|
||||||
for (final String disc : DISCS) {
|
for (final String disc : DISCS) {
|
||||||
final String name = String.format("<gold>%s</gold>", disc);
|
final String name = String.format("<gold>%s</gold>", disc);
|
||||||
final String[] lore = {"<green>Click to play!</green>"};
|
final String[] lore = {TranslatableCaption.of("plotjukebox.click_to_play").getComponent(player)};
|
||||||
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 = "<gold>Cancel music</gold>";
|
String name = TranslatableCaption.of("plotjukebox.cancel_music").getComponent(player);
|
||||||
String[] lore = {"<red>Click to remove the music!<reset>"};
|
String[] lore = {TranslatableCaption.of("plotjukebox.reset_music").getComponent(player)};
|
||||||
inv.setItem(index, new PlotItemStack("bedrock", 1, name, lore));
|
inv.setItem(index, new PlotItemStack("bedrock", 1, name, lore));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
@ -670,5 +670,9 @@
|
|||||||
"commands.description.trust": "<gray>Allow a user to build in a plot and use WorldEdit while the plot owner is offline.</gray>",
|
"commands.description.trust": "<gray>Allow a user to build in a plot and use WorldEdit while the plot owner is offline.</gray>",
|
||||||
"commands.description.unlink": "<gray>Unlink a mega-plot.</gray>",
|
"commands.description.unlink": "<gray>Unlink a mega-plot.</gray>",
|
||||||
"commands.description.visit": "<gray>Visit someones plot.</gray>",
|
"commands.description.visit": "<gray>Visit someones plot.</gray>",
|
||||||
"commands.description.weanywhere": "<gray>Force bypass of WorldEdit restrictions.</gray>"
|
"commands.description.weanywhere": "<gray>Force bypass of WorldEdit restrictions.</gray>",
|
||||||
|
"plotjukebox.jukebox_header": "Plot Jukebox",
|
||||||
|
"plotjukebox.click_to_play": "<green>Click to play!</green>",
|
||||||
|
"plotjukebox.cancel_music": "<gold>Cancel music</gold>",
|
||||||
|
"plotjukebox.reset_music": "<red>Click to remove the music!</red>"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user