fix #89 and fix #87

This commit is contained in:
C10udburst
2022-01-01 16:23:43 +01:00
parent fe87508fa3
commit 05fa87a0a3
2 changed files with 8 additions and 6 deletions

View File

@@ -47,8 +47,11 @@ public class SaveSkinCommand extends Command {
PlayerEntity playerEntity = ctx.getArgument("player", PlayerEntity.class);
String path = TinyFileDialogs.tinyfd_saveFileDialog("Save image", null, filters, null);
if (path == null) IO_EXCEPTION.create();
if (!path.endsWith(".png")) path += ".png";
saveSkin(playerEntity.getUuidAsString(),path);
if (path != null) {
if (!path.endsWith(".png")) path += ".png";
saveSkin(playerEntity.getUuidAsString(),path);
}
return SINGLE_SUCCESS;
}));
}