Added warning to CommandLocaleExport

This commit is contained in:
Auxilor 2021-11-26 18:22:35 +00:00
parent 895fb30417
commit 14f6c95095
2 changed files with 12 additions and 5 deletions

View File

@ -33,11 +33,17 @@ public class CommandLocaleExport extends Subcommand {
Paste paste = new Paste(configuration.saveToString());
paste.getHastebinToken(token -> {
if (token.length() > 15) {
sender.sendMessage(
this.getPlugin().getLangYml().getMessage("export-failed")
);
} else {
sender.sendMessage(
this.getPlugin().getLangYml().getMessage("link-to-locale").replace(
"%token%", token
)
);
}
});
};
}

View File

@ -34,6 +34,7 @@ messages:
enabled-descriptions: "&fYou have successfully &aenabled &fenchantment descriptions!"
disabled-descriptions: "&fYou have successfully &cdisabled &fenchantment descriptions!"
descriptions-disabled: "&cEnchantment descriptions are disabled on this server."
export-failed: "&cExporting the locale failed. Try again later!"
no-targets: "&cCannot be applied"
no-conflicts: "&cNo conflicts"