Move dependency folder, add dependency version info

This commit is contained in:
ceze88 2024-02-02 16:27:52 +01:00
parent eeb2724e04
commit 1ec750cacf
3 changed files with 10 additions and 3 deletions

View File

@ -1,6 +1,7 @@
package com.craftaro.core.core;
import com.craftaro.core.compatibility.CompatibleMaterial;
import com.craftaro.core.dependency.DependencyLoader;
import com.craftaro.core.verification.ProductVerificationStatus;
import com.cryptomorin.xseries.XMaterial;
import org.bukkit.plugin.java.JavaPlugin;
@ -110,4 +111,8 @@ public final class PluginInfo {
public String getCoreLibraryVersion() {
return coreLibraryVersion;
}
public String getDependencyVersion() {
return DependencyLoader.DEPENDENCY_VERSION;
}
}

View File

@ -52,10 +52,11 @@ public class SongodaCoreDiagCommand extends AbstractCommand {
sender.sendMessage("Plugins:");
for (PluginInfo plugin : SongodaCore.getPlugins()) {
sender.sendMessage(String.format("%s v%s (Core v%s)",
sender.sendMessage(String.format("%s v%s (Core v%s) (Dependency: %s)",
plugin.getJavaPlugin().getName(),
plugin.getJavaPlugin().getDescription().getVersion(),
plugin.getCoreLibraryVersion()));
plugin.getCoreLibraryVersion()),
plugin.getDependencyVersion());
}
sender.sendMessage("");

View File

@ -39,8 +39,9 @@ import java.util.zip.ZipOutputStream;
public class DependencyLoader {
public static final String DEPENDENCY_VERSION = "v1";
private static final Logger logger = Logger.getLogger("CraftaroCore");
private static final LibraryLoader libraryLoader = new LibraryLoader(new File("craftaro"));
private static final LibraryLoader libraryLoader = new LibraryLoader(new File("plugins/CraftaroCore/dependencies/" + DEPENDENCY_VERSION));
public static LibraryLoader getLibraryLoader() {
return libraryLoader;