Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-08 04:20:06 +01:00
Catch IOException on report command
Dieser Commit ist enthalten in:
Ursprung
95b4ce59a1
Commit
2b29266db2
@ -21,6 +21,7 @@ package com.sk89q.worldedit.command;
|
|||||||
|
|
||||||
import com.boydti.fawe.Fawe;
|
import com.boydti.fawe.Fawe;
|
||||||
import com.boydti.fawe.FaweVersion;
|
import com.boydti.fawe.FaweVersion;
|
||||||
|
import com.sk89q.worldedit.util.formatting.text.Component;
|
||||||
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||||
import com.boydti.fawe.config.Settings;
|
import com.boydti.fawe.config.Settings;
|
||||||
import com.boydti.fawe.util.IncendoPaster;
|
import com.boydti.fawe.util.IncendoPaster;
|
||||||
@ -135,8 +136,13 @@ public class WorldEditCommands {
|
|||||||
desc = "Writes a report of latest.log, config.yml, message.yml https://athion.net/ISPaster/paste"
|
desc = "Writes a report of latest.log, config.yml, message.yml https://athion.net/ISPaster/paste"
|
||||||
)
|
)
|
||||||
@CommandPermissions(value = {"worldedit.report", "worldedit.debugpaste"}, queued = false)
|
@CommandPermissions(value = {"worldedit.report", "worldedit.debugpaste"}, queued = false)
|
||||||
public void report(Actor actor) throws WorldEditException, IOException {
|
public void report(Actor actor) throws WorldEditException {
|
||||||
String dest = IncendoPaster.debugPaste();
|
String dest = "";
|
||||||
|
try {
|
||||||
|
dest = IncendoPaster.debugPaste();
|
||||||
|
} catch (IOException e) {
|
||||||
|
actor.printInfo(TextComponent.of(e.getMessage()));
|
||||||
|
}
|
||||||
actor.printInfo(TranslatableComponent.of("worldedit.report.written", TextComponent.of(dest)));
|
actor.printInfo(TranslatableComponent.of("worldedit.report.written", TextComponent.of(dest)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren