mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Catch IOException on report command
This commit is contained in:
parent
95b4ce59a1
commit
2b29266db2
@ -21,6 +21,7 @@ package com.sk89q.worldedit.command;
|
||||
|
||||
import com.boydti.fawe.Fawe;
|
||||
import com.boydti.fawe.FaweVersion;
|
||||
import com.sk89q.worldedit.util.formatting.text.Component;
|
||||
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||
import com.boydti.fawe.config.Settings;
|
||||
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"
|
||||
)
|
||||
@CommandPermissions(value = {"worldedit.report", "worldedit.debugpaste"}, queued = false)
|
||||
public void report(Actor actor) throws WorldEditException, IOException {
|
||||
String dest = IncendoPaster.debugPaste();
|
||||
public void report(Actor actor) throws WorldEditException {
|
||||
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)));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user