Skip to content

Commit

Permalink
Use a constant for "assets"
Browse files Browse the repository at this point in the history
  • Loading branch information
esotericenderman committed Aug 14, 2024
1 parent 85c2c7f commit 33e4764
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public class ResourcePackManager {
private final String resourcePackFileExtension = "zip";
private final String resourcePackFileMimeType = resourcePackFileType + FileUtil.getFileMimeTypeTypeSubtypeSeparator() + resourcePackFileExtension;

private final String resourcePackAssetsFolderName = "assets";

private String resourcePackZipFilePath;
private File resourcePackZipFile;

Expand Down Expand Up @@ -59,11 +61,11 @@ private void saveResourcepackZipFile() {
return;
}

if (!List.of(resourcePackFiles).contains("assets")) {
if (!List.of(resourcePackFiles).contains(resourcePackAssetsFolderName)) {
return;
}

File assetsFile = new File(plugin.getDataPath() + File.separator + resourcePackResourceFolderName + File.separator + "assets");
File assetsFile = new File(plugin.getDataPath() + File.separator + resourcePackResourceFolderName + File.separator + resourcePackAssetsFolderName);
if (FileUtil.isDirectoryRecursivelyEmpty(assetsFile)) {
return;
}
Expand Down

0 comments on commit 33e4764

Please sign in to comment.