From 2b7d1412b5121788cf3f729dc0be2ede30b027b0 Mon Sep 17 00:00:00 2001 From: zax71 Date: Wed, 30 Aug 2023 17:23:19 +0100 Subject: [PATCH] Remove uploading message and print out directly --- .../MultiverseCore/commands/DumpsCommand.java | 33 ++++++++----------- .../MultiverseCore/utils/MVCorei18n.java | 2 -- .../resources/multiverse-core_en.properties | 2 -- 3 files changed, 13 insertions(+), 24 deletions(-) diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/DumpsCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/DumpsCommand.java index 594138ef..ad7da2a6 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/DumpsCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/DumpsCommand.java @@ -159,13 +159,11 @@ public class DumpsCommand extends MultiverseCommand { // Deal with logs flag if (!parsedFlags.hasFlag("--paranoid")) { switch (finalLogsType) { - case MCLOGS -> { - issuer.sendInfo(MVCorei18n.DUMPS_UPLOADING_LOGS, "{link}", "https://mclo.gs"); - pasteURLs.put("Logs", postToService(PasteServiceType.MCLOGS, false, getLogs(), null)); - } - case APPEND -> { - versionEvent.putDetailedVersionInfo("latest.log", getLogs()); - } + case MCLOGS -> issuer.sendInfo(MVCorei18n.DUMPS_URL_LIST, + "{service}", "Logs", + "{link}", postToService(PasteServiceType.MCLOGS, true, getLogs(), null) + ); + case APPEND -> versionEvent.putDetailedVersionInfo("latest.log", getLogs()); } } @@ -174,20 +172,15 @@ public class DumpsCommand extends MultiverseCommand { // Deal with uploading debug info switch (finalServices) { - case PASTEGG -> { - issuer.sendInfo(MVCorei18n.DUMPS_UPLOADING, "{link}", "https://paste.gg"); - pasteURLs.put("paste.gg", postToService(PasteServiceType.PASTEGG, true, null, files)); - } - case PASTESDEV -> { - issuer.sendInfo(MVCorei18n.DUMPS_UPLOADING, "{link}", "https://pastes.dev"); - pasteURLs.put("pastes.dev", postToService(PasteServiceType.PASTESDEV, true, null, files)); - } - } + case PASTEGG -> issuer.sendInfo(MVCorei18n.DUMPS_URL_LIST, + "{service}", "paste.gg", + "{link}", postToService(PasteServiceType.PASTEGG, true, null, files) + ); - // Finally, loop through and print all URLs - for (String service : pasteURLs.keySet()) { - String link = pasteURLs.get(service); - issuer.sendInfo(MVCorei18n.DUMPS_URL_LIST, "{service}", service, "{link}", link); + case PASTESDEV -> issuer.sendInfo(MVCorei18n.DUMPS_URL_LIST, + "{service}", "pastes.dev", + "{link}", postToService(PasteServiceType.PASTESDEV, true, null, files) + ); } } diff --git a/src/main/java/com/onarandombox/MultiverseCore/utils/MVCorei18n.java b/src/main/java/com/onarandombox/MultiverseCore/utils/MVCorei18n.java index 9053efc6..3b7c59c8 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/utils/MVCorei18n.java +++ b/src/main/java/com/onarandombox/MultiverseCore/utils/MVCorei18n.java @@ -39,8 +39,6 @@ public enum MVCorei18n implements MessageKeyProvider { // Dumps command DUMPS_DESCRIPTION, - DUMPS_UPLOADING, - DUMPS_UPLOADING_LOGS, DUMPS_URL_LIST, // gamerule command GAMERULE_FAILED, diff --git a/src/main/resources/multiverse-core_en.properties b/src/main/resources/multiverse-core_en.properties index 2ac6828c..5b90b250 100644 --- a/src/main/resources/multiverse-core_en.properties +++ b/src/main/resources/multiverse-core_en.properties @@ -52,8 +52,6 @@ mv-core.delete.prompt=Are you sure you want to delete world '{world}'? # /mv dumps mv-core.dumps.description=Dumps version info to the console or paste services -mv-core.dumps.uploading=Uploading debug info to {link} -mv-core.dumps.uploading.logs=Uploading logs to {link} mv-core.dumps.url.list={service} : {link} # /mv gamerule