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
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)
);
}
}

View File

@ -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,

View File

@ -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