mirror of
https://github.com/Xiao-MoMi/Custom-Nameplates.git
synced 2026-01-04 15:31:47 +00:00
Added craftengine support
This commit is contained in:
@@ -104,6 +104,7 @@ public abstract class ConfigManager implements ConfigLoader, Reloadable {
|
||||
protected boolean packOraxen;
|
||||
protected boolean packNexo;
|
||||
protected boolean packCreativeCentral;
|
||||
protected boolean packCraftEngine;
|
||||
|
||||
protected boolean chatUnsafe;
|
||||
protected boolean chatTR;
|
||||
@@ -188,6 +189,7 @@ public abstract class ConfigManager implements ConfigLoader, Reloadable {
|
||||
packOraxen = config.getBoolean("integrations.resource-pack.Oraxen", false);
|
||||
packCreativeCentral = config.getBoolean("integrations.resource-pack.Creative-Central");
|
||||
packNexo = config.getBoolean("integrations.resource-pack.Nexo");
|
||||
packCraftEngine = config.getBoolean("integrations.resource-pack.CraftEngine", false);
|
||||
|
||||
chatUnsafe = config.getBoolean("other-settings.unsafe-chat-event", false);
|
||||
chatEss = config.getBoolean("integrations.chat.Essentials", false);
|
||||
@@ -321,6 +323,10 @@ public abstract class ConfigManager implements ConfigLoader, Reloadable {
|
||||
return instance.packNexo;
|
||||
}
|
||||
|
||||
public static boolean packCraftEngine() {
|
||||
return instance.packCraftEngine;
|
||||
}
|
||||
|
||||
public static boolean packCreativeCentral() { return instance.packCreativeCentral; }
|
||||
|
||||
public static boolean hideScoreBoardNumber() {
|
||||
|
||||
@@ -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"));
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Project settings
|
||||
# Rule: [major update].[feature update].[bug fix]
|
||||
project_version=3.0.16
|
||||
config_version=35
|
||||
project_version=3.0.17
|
||||
config_version=36
|
||||
project_group=net.momirealms
|
||||
|
||||
# Supported languages
|
||||
|
||||
Reference in New Issue
Block a user