Remove uploading message and print out directly

This commit is contained in:
zax71 2023-08-30 17:23:19 +01:00
parent 560a6d4d7e
commit 2b7d1412b5
3 changed files with 13 additions and 24 deletions

View File

@ -159,13 +159,11 @@ public class DumpsCommand extends MultiverseCommand {
// Deal with logs flag // Deal with logs flag
if (!parsedFlags.hasFlag("--paranoid")) { if (!parsedFlags.hasFlag("--paranoid")) {
switch (finalLogsType) { switch (finalLogsType) {
case MCLOGS -> { case MCLOGS -> issuer.sendInfo(MVCorei18n.DUMPS_URL_LIST,
issuer.sendInfo(MVCorei18n.DUMPS_UPLOADING_LOGS, "{link}", "https://mclo.gs"); "{service}", "Logs",
pasteURLs.put("Logs", postToService(PasteServiceType.MCLOGS, false, getLogs(), null)); "{link}", postToService(PasteServiceType.MCLOGS, true, getLogs(), null)
} );
case APPEND -> { case APPEND -> versionEvent.putDetailedVersionInfo("latest.log", getLogs());
versionEvent.putDetailedVersionInfo("latest.log", getLogs());
}
} }
} }
@ -174,20 +172,15 @@ public class DumpsCommand extends MultiverseCommand {
// Deal with uploading debug info // Deal with uploading debug info
switch (finalServices) { switch (finalServices) {
case PASTEGG -> { case PASTEGG -> issuer.sendInfo(MVCorei18n.DUMPS_URL_LIST,
issuer.sendInfo(MVCorei18n.DUMPS_UPLOADING, "{link}", "https://paste.gg"); "{service}", "paste.gg",
pasteURLs.put("paste.gg", postToService(PasteServiceType.PASTEGG, true, null, files)); "{link}", 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));
}
}
// Finally, loop through and print all URLs case PASTESDEV -> issuer.sendInfo(MVCorei18n.DUMPS_URL_LIST,
for (String service : pasteURLs.keySet()) { "{service}", "pastes.dev",
String link = pasteURLs.get(service); "{link}", postToService(PasteServiceType.PASTESDEV, true, null, files)
issuer.sendInfo(MVCorei18n.DUMPS_URL_LIST, "{service}", service, "{link}", link); );
} }
} }

View File

@ -39,8 +39,6 @@ public enum MVCorei18n implements MessageKeyProvider {
// Dumps command // Dumps command
DUMPS_DESCRIPTION, DUMPS_DESCRIPTION,
DUMPS_UPLOADING,
DUMPS_UPLOADING_LOGS,
DUMPS_URL_LIST, DUMPS_URL_LIST,
// gamerule command // gamerule command
GAMERULE_FAILED, GAMERULE_FAILED,

View File

@ -52,8 +52,6 @@ mv-core.delete.prompt=Are you sure you want to delete world '{world}'?
# /mv dumps # /mv dumps
mv-core.dumps.description=Dumps version info to the console or paste services 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-core.dumps.url.list={service} : {link}
# /mv gamerule # /mv gamerule