Make /plot rate categories translatable

This commit is contained in:
NotMyFault 2021-06-08 10:49:26 +02:00
parent 24945efc7d
commit 9b043b7444
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
4 changed files with 38 additions and 11 deletions

View File

@ -105,7 +105,7 @@ tasks {
opt.links("https://papermc.io/javadocs/paper/1.16/")
opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-core/7.2.5/")
opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-bukkit/7.2.5/")
opt.links("https://jd.adventure.kyori.net/api/4.7.0/")
opt.links("https://jd.adventure.kyori.net/api/4.8.0/")
opt.links("https://google.github.io/guice/api-docs/5.0.1/javadoc/")
opt.links("https://checkerframework.org/api/")
}

View File

@ -184,15 +184,33 @@ public class Rate extends SubCommand {
return true;
}
};
inventory.setItem(0, new PlotItemStack(Settings.Ratings.BLOCK_0, 1, "0/8"));
inventory.setItem(1, new PlotItemStack(Settings.Ratings.BLOCK_1, 1, "1/8"));
inventory.setItem(2, new PlotItemStack(Settings.Ratings.BLOCK_2, 2, "2/8"));
inventory.setItem(3, new PlotItemStack(Settings.Ratings.BLOCK_3, 3, "3/8"));
inventory.setItem(4, new PlotItemStack(Settings.Ratings.BLOCK_4, 4, "4/8"));
inventory.setItem(5, new PlotItemStack(Settings.Ratings.BLOCK_5, 5, "5/8"));
inventory.setItem(6, new PlotItemStack(Settings.Ratings.BLOCK_6, 6, "6/8"));
inventory.setItem(7, new PlotItemStack(Settings.Ratings.BLOCK_7, 7, "7/8"));
inventory.setItem(8, new PlotItemStack(Settings.Ratings.BLOCK_8, 8, "8/8"));
inventory.setItem(0, new PlotItemStack(Settings.Ratings.BLOCK_0, 1,
TranslatableCaption.of("ratings.0-8").getComponent(player)
));
inventory.setItem(1, new PlotItemStack(Settings.Ratings.BLOCK_1, 1,
TranslatableCaption.of("ratings.1-8").getComponent(player)
));
inventory.setItem(2, new PlotItemStack(Settings.Ratings.BLOCK_2, 2,
TranslatableCaption.of("ratings.2-8").getComponent(player)
));
inventory.setItem(3, new PlotItemStack(Settings.Ratings.BLOCK_3, 3,
TranslatableCaption.of("ratings.3-8").getComponent(player)
));
inventory.setItem(4, new PlotItemStack(Settings.Ratings.BLOCK_4, 4,
TranslatableCaption.of("ratings.4-8").getComponent(player)
));
inventory.setItem(5, new PlotItemStack(Settings.Ratings.BLOCK_5, 5,
TranslatableCaption.of("ratings.5-8").getComponent(player)
));
inventory.setItem(6, new PlotItemStack(Settings.Ratings.BLOCK_6, 6,
TranslatableCaption.of("ratings.6-8").getComponent(player)
));
inventory.setItem(7, new PlotItemStack(Settings.Ratings.BLOCK_7, 7,
TranslatableCaption.of("ratings.7-8").getComponent(player)
));
inventory.setItem(8, new PlotItemStack(Settings.Ratings.BLOCK_8, 8,
TranslatableCaption.of("ratings.8-8").getComponent(player)
));
inventory.openInventory();
}
};

View File

@ -100,6 +100,15 @@
"ratings.rating_not_your_own": "<prefix><red>You cannot rate your own plot.</red>",
"ratings.rating_not_done": "<prefix><red>You can only rate finished plots.</red>",
"ratings.rating_not_owned": "<prefix><red>You cannot rate a plot that is not claimed by anyone.</red>",
"ratings.0-8": "0/8",
"ratings.1-8": "1/8",
"ratings.2-8": "2/8",
"ratings.3-8": "3/8",
"ratings.4-8": "4/8",
"ratings.5-8": "5/8",
"ratings.6-8": "6/8",
"ratings.7-8": "7/8",
"ratings.8-8": "8/8",
"tutorial.rate_this": "<prefix><gray>Rate this plot!</gray>",
"tutorial.comment_this": "<prefix><gray>Leave some feedback on this plot: <plot>.</gray>",
"economy.econ_disabled": "<prefix><red>Economy is not enabled.</red>",

View File

@ -6,7 +6,7 @@ gson = "2.8.0"
snakeyaml = "1.27"
adventure-api = "4.7.0"
adventure-api = "4.8.0"
adventure-text-minimessage = "4.1.0-SNAPSHOT"
adventure-platform-bukkit = "4.0.0-SNAPSHOT"