9
0
mirror of https://github.com/Xiao-MoMi/Custom-Nameplates.git synced 2025-12-19 15:09:23 +00:00

Add creative-central resourcepack integration support

This commit is contained in:
Justin
2024-10-24 22:58:27 -04:00
parent f66c800f3a
commit 84a37ed619
3 changed files with 12 additions and 0 deletions

View File

@@ -102,6 +102,7 @@ public abstract class ConfigManager implements ConfigLoader, Reloadable {
protected boolean packItemsAdder;
protected boolean packItemsAdderLegacy;
protected boolean packOraxen;
protected boolean packCreativeCentral;
protected boolean chatUnsafe;
protected boolean chatTR;
@@ -179,6 +180,7 @@ public abstract class ConfigManager implements ConfigLoader, Reloadable {
packItemsAdderLegacy = config.getBoolean("integrations.resource-pack.ItemsAdder-old-method", false);
if (packItemsAdder) packItemsAdderLegacy = false;
packOraxen = config.getBoolean("integrations.resource-pack.Oraxen", false);
packCreativeCentral = config.getBoolean("integrations.resource-pack.Creative-Central");
chatUnsafe = config.getBoolean("other-settings.unsafe-chat-event", false);
chatEss = config.getBoolean("integrations.chat.Essentials", false);
@@ -303,6 +305,8 @@ public abstract class ConfigManager implements ConfigLoader, Reloadable {
return instance.packOraxen;
}
public static boolean packCreativeCentral() { return instance.packCreativeCentral; }
public static boolean hideScoreBoardNumber() {
return instance.hideScoreBoardNumber;
}

View File

@@ -218,6 +218,13 @@ public class ResourcePackManagerImpl implements ResourcePackManager {
plugin.getPluginLogger().warn("Failed to copy files to Oraxen", e);
}
}
if(ConfigManager.packCreativeCentral()) {
try {
FileUtils.copyDirectory(new File(resourcePackFolder, "assets"), new File(pluginsFolder, "creative-central" + File.separator + "resources" + File.separator + "assets"));
} catch (IOException e){
plugin.getPluginLogger().warn("Failed to copy files to Creative-Central", e);
}
}
}
private List<JsonObject> getBubbles(File texturesFolder) {

View File

@@ -25,6 +25,7 @@ integrations:
ItemsAdder: false # Integration with ItemsAdder
ItemsAdder-old-method: false # Old method for ItemsAdder
Oraxen: false # Integration with Oraxen
Creative-Central: false # Integration with Creative-Central
chat:
TrChat: false # Integration with TrChat
VentureChat: false # Integration with VentureChat