Recover from failed schematic pasting.

This commit is contained in:
boy0001 2015-06-24 00:58:55 +10:00
parent 4f7de9bf13
commit 4d808864fd

View File

@ -89,6 +89,7 @@ public class SchematicCmd extends SubCommand {
TaskManager.runTaskAsync(new Runnable() {
@Override
public void run() {
try {
final Schematic schematic = SchematicHandler.manager.getSchematic(file2);
if (schematic == null) {
sendMessage(plr, C.SCHEMATIC_INVALID, "non-existent or not in gzip format");
@ -147,6 +148,12 @@ public class SchematicCmd extends SubCommand {
}
}, 1);
}
catch (Exception e) {
e.printStackTrace();
SchematicCmd.this.running = false;
MainUtil.sendMessage(plr, "&cAn error occured, see console for more information");
}
}
});
break;
}