Added %time% placeholder to reload message

This commit is contained in:
Auxilor 2021-11-09 08:33:35 +00:00
parent 4d7e1ee20f
commit 9adeaef96d
2 changed files with 5 additions and 3 deletions

View File

@ -2,6 +2,8 @@ package com.willfp.ecoenchants.command;
import com.willfp.eco.core.command.CommandHandler;
import com.willfp.eco.core.command.impl.Subcommand;
import com.willfp.eco.util.NumberUtils;
import com.willfp.eco.util.StringUtils;
import com.willfp.ecoenchants.EcoEnchantsPlugin;
import org.jetbrains.annotations.NotNull;
@ -18,8 +20,8 @@ public class CommandReload extends Subcommand {
@Override
public CommandHandler getHandler() {
return (sender, args) -> {
this.getPlugin().reload();
sender.sendMessage(this.getPlugin().getLangYml().getMessage("reloaded"));
sender.sendMessage(this.getPlugin().getLangYml().getMessage("reloaded", StringUtils.FormatOption.WITHOUT_PLACEHOLDERS)
.replace("%time%", NumberUtils.format(this.getPlugin().reloadWithTime())));
};
}
}

View File

@ -5,7 +5,7 @@ messages:
no-permission: "&cYou don't have permission to do this!"
not-player: "&cThis command must be run by a player"
invalid-command: "&cUnknown subcommand!"
reloaded: "Reloaded!"
reloaded: "Reloaded! Took %time%ms"
got-special: "You got a &dSpecial &fenchantment!"
skip-added: "&aAdded &flore skip to item!"
skip-removed: "&cRemoved &flore skip from item!"