Skip to content

Commit

Permalink
Remove FileManager.java as it has become obsolete
Browse files Browse the repository at this point in the history
  • Loading branch information
esotericenderman committed Oct 28, 2024
1 parent 90d3b9a commit 62db2be
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 29 deletions.
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ dependencies {
implementation("dev.jorel", "commandapi-bukkit-shade-mojang-mapped", "9.5.3")
implementation("net.lingala.zip4j", "zip4j", "2.11.5")
implementation("com.github.EsotericFoundation:utility.kt:0.1.0")
implementation("com.github.EsotericFoundation:plugin-library:0.1.0")
}

tasks {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import dev.jorel.commandapi.CommandAPI;
import dev.jorel.commandapi.CommandAPIBukkitConfig;
import foundation.esoteric.minecraft.plugins.library.file.FileManagedPlugin;
import foundation.esoteric.minecraft.plugins.library.file.FileManager;
import org.bukkit.NamespacedKey;
import org.bukkit.plugin.java.JavaPlugin;
import org.esoteric.minecraft.plugins.template.commands.GiveCustomItemCommand;
Expand All @@ -15,13 +17,12 @@
import org.esoteric.minecraft.plugins.template.custom.multientities.CustomMultientity;
import org.esoteric.minecraft.plugins.template.custom.multientities.CustomMultientityManager;
import org.esoteric.minecraft.plugins.template.data.player.PlayerDataManager;
import org.esoteric.minecraft.plugins.template.file.FileManager;
import org.esoteric.minecraft.plugins.template.http.server.HttpServerManager;
import org.esoteric.minecraft.plugins.template.language.LanguageManager;
import org.esoteric.minecraft.plugins.template.language.Message;
import org.esoteric.minecraft.plugins.template.resourcepack.ResourcePackManager;

public final class PaperTemplatePlugin extends JavaPlugin {
public final class PaperTemplatePlugin extends JavaPlugin implements FileManagedPlugin {

private FileManager fileManager;
private PlayerDataManager playerDataManager;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public LanguageManager(@NotNull PaperTemplatePlugin plugin) {

private void saveLanguageFiles() {
String languagesResourceFolderName = languagesFolderName;
plugin.getFileManager().saveResourceFileFolder(languagesResourceFolderName, !plugin.getConfig().getBoolean("language.use-custom-messages"));
plugin.getFileManager().saveResourceFolder(languagesResourceFolderName, !plugin.getConfig().getBoolean("language.use-custom-messages"));
}

private void loadLanguageMessages() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ public ResourcePackManager(PaperTemplatePlugin plugin) {
}

private void saveResourcepackZipFile() {
assert plugin.getFileManager() != null;
File resourcePackFolder = plugin.getFileManager().saveResourceFileFolder(resourcePackResourceFolderName);
File resourcePackFolder = plugin.getFileManager().saveResourceFolder(resourcePackResourceFolderName, true);

String[] resourcePackFiles = resourcePackFolder.list();
if (resourcePackFiles == null || resourcePackFiles.length == 0) {
Expand Down

0 comments on commit 62db2be

Please sign in to comment.