diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/command/CommandLocaleExport.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/command/CommandLocaleExport.java index cfd625c5..c6cb3347 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/command/CommandLocaleExport.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/command/CommandLocaleExport.java @@ -33,11 +33,17 @@ public class CommandLocaleExport extends Subcommand { Paste paste = new Paste(configuration.saveToString()); paste.getHastebinToken(token -> { - sender.sendMessage( - this.getPlugin().getLangYml().getMessage("link-to-locale").replace( - "%token%", 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 + ) + ); + } }); }; } diff --git a/eco-core/core-plugin/src/main/resources/lang.yml b/eco-core/core-plugin/src/main/resources/lang.yml index 7e3879da..5c8bcf92 100644 --- a/eco-core/core-plugin/src/main/resources/lang.yml +++ b/eco-core/core-plugin/src/main/resources/lang.yml @@ -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"