mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-01 14:38:50 +00:00
Fix crash when saving path to file player skin
This commit is contained in:
1 parent
89201e682c
commit
297db34bab
2 files changed
+6
-6
No files matched your search
@@ -31,10 +31,10 @@ public class FilePlayerSkin {
|
||||
}
|
||||
}
|
||||
|
||||
private PlayerSkin playerSkin = null;
|
||||
private final Path pathToSkin;
|
||||
private transient PlayerSkin playerSkin = null;
|
||||
private final String pathToSkin;
|
||||
|
||||
public FilePlayerSkin(Path pathToSkin) {
|
||||
public FilePlayerSkin(String pathToSkin) {
|
||||
this.pathToSkin = pathToSkin;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,8 @@ public class FilePlayerSkin {
|
||||
return this.playerSkin;
|
||||
}
|
||||
|
||||
try (InputStream inputStream = Files.newInputStream(this.pathToSkin)) {
|
||||
Path path = Path.of(this.pathToSkin);
|
||||
try (InputStream inputStream = Files.newInputStream(path)) {
|
||||
NativeImage nativeImage = NativeImage.read(inputStream);
|
||||
|
||||
// We determine the type using the alpha of the pixel at 54, 20
|
||||
|
||||
Reference in new issue
Block a user