mirror of
https://github.com/rockyhawk64/CommandPanels.git
synced 2025-11-18 07:14:17 +01:00
Compare commits
2 Commits
589d9cc046
...
c646e6a848
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c646e6a848 | ||
|
|
5deead3c96 |
2
pom.xml
2
pom.xml
@ -111,7 +111,7 @@
|
||||
<dependency>
|
||||
<groupId>io.papermc.paper</groupId>
|
||||
<artifactId>paper-api</artifactId>
|
||||
<version>1.21.9-R0.1-SNAPSHOT</version>
|
||||
<version>1.21.10-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
name: CommandPanels
|
||||
version: 4.1.0
|
||||
api-version: 1.21.9
|
||||
api-version: 1.21.10
|
||||
|
||||
main: me.rockyhawk.commandpanels.CommandPanels
|
||||
description: Fully Custom Interactive GUIs with Animations and Logic.
|
||||
|
||||
@ -24,8 +24,8 @@ public class VersionCommand implements SubCommand {
|
||||
public boolean execute(Context ctx, CommandSender sender, String[] args) {
|
||||
sender.sendMessage(ctx.text.getPrefix());
|
||||
|
||||
String translatedDeveloper = ctx.text.lang.translate(Message.PLUGIN_DEVELOPER);
|
||||
String translatedVersion = ctx.text.lang.translate(Message.PLUGIN_VERSION);
|
||||
String translatedDeveloper = ensurePlaceholder(ctx.text.lang.translate(Message.PLUGIN_DEVELOPER));
|
||||
String translatedVersion = ensurePlaceholder(ctx.text.lang.translate(Message.PLUGIN_VERSION));
|
||||
sender.sendMessage(Component.text()
|
||||
.color(NamedTextColor.DARK_AQUA)
|
||||
.append(LegacyComponentSerializer.legacyAmpersand().deserialize(translatedDeveloper))
|
||||
@ -42,4 +42,10 @@ public class VersionCommand implements SubCommand {
|
||||
.replacement(Component.text(ctx.plugin.getPluginMeta().getVersion(), NamedTextColor.WHITE))));
|
||||
return true;
|
||||
}
|
||||
|
||||
// Add version number and credits back if removed from language message
|
||||
private String ensurePlaceholder(String text) {
|
||||
return text.contains("{0}") ? text : text + " {0}";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user