9
0
mirror of https://github.com/Xiao-MoMi/Custom-Nameplates.git synced 2025-12-30 20:29:07 +00:00

Added craftengine support

This commit is contained in:
XiaoMoMi
2024-12-28 17:04:52 +08:00
parent 0270830517
commit 9b26ce4e19
4 changed files with 19 additions and 2 deletions

View File

@@ -244,6 +244,16 @@ public class ResourcePackManagerImpl implements ResourcePackManager {
plugin.getPluginLogger().warn("Failed to copy files to Nexo", e);
}
}
if (ConfigManager.packCraftEngine()){
try {
FileUtils.deleteDirectory(new File(pluginsFolder, "CraftEngine" + File.separator + "resources" + File.separator + "nameplates"));
FileUtils.copyDirectory(resourcePackFolder, new File(pluginsFolder, "CraftEngine" + File.separator + "resources" + File.separator + "CustomNameplates" + File.separator + "resourcepack"));
FileUtils.delete(new File(pluginsFolder, "CraftEngine" + File.separator + "resources" + File.separator + "CustomNameplates" + File.separator + "resourcepack" + File.separator + "pack.mcmeta"));
FileUtils.delete(new File(pluginsFolder, "CraftEngine" + File.separator + "resources" + File.separator + "CustomNameplates" + File.separator + "resourcepack" + File.separator + "pack.png"));
} catch (IOException e){
plugin.getPluginLogger().warn("Failed to copy files to CraftEngine", e);
}
}
if(ConfigManager.packCreativeCentral()) {
try {
FileUtils.copyDirectory(new File(resourcePackFolder, "assets"), new File(pluginsFolder, "creative-central" + File.separator + "resources" + File.separator + "assets"));

View File

@@ -22,6 +22,7 @@ modules:
# Plugin Integrations: Integrate resource packs and chat plugins with other plugins.
integrations:
resource-pack:
CraftEngine: false # Integration with CraftEngine
ItemsAdder: false # Integration with ItemsAdder
ItemsAdder-old-method: false # Legacy integration with ItemsAdder
Oraxen: false # Integration with Oraxen