diff --git a/Components/Minepacks-Bootstrap-Paper/pom.xml b/Components/Minepacks-Bootstrap-Paper/pom.xml
index ede2a5f..c6069a7 100644
--- a/Components/Minepacks-Bootstrap-Paper/pom.xml
+++ b/Components/Minepacks-Bootstrap-Paper/pom.xml
@@ -38,6 +38,12 @@
1.19.3-R0.1-SNAPSHOT
provided
+
+ at.pcgamingfreaks
+ Minepacks-MagicValues
+ ${version}
+ provided
+
diff --git a/Components/Minepacks-Bootstrap-Paper/src/at/pcgamingfreaks/Minepacks/Paper/MinepacksBootstrap.java b/Components/Minepacks-Bootstrap-Paper/src/at/pcgamingfreaks/Minepacks/Paper/MinepacksBootstrap.java
index dfe4fef..4fc0c2f 100644
--- a/Components/Minepacks-Bootstrap-Paper/src/at/pcgamingfreaks/Minepacks/Paper/MinepacksBootstrap.java
+++ b/Components/Minepacks-Bootstrap-Paper/src/at/pcgamingfreaks/Minepacks/Paper/MinepacksBootstrap.java
@@ -17,6 +17,10 @@
package at.pcgamingfreaks.Minepacks.Paper;
+import at.pcgamingfreaks.Minepacks.MagicValues;
+import at.pcgamingfreaks.PCGF_PluginLibVersionDetection;
+import at.pcgamingfreaks.Version;
+
import org.bukkit.plugin.java.JavaPlugin;
import org.jetbrains.annotations.NotNull;
@@ -78,21 +82,21 @@ private boolean patchPluginMeta(final @NotNull PluginProviderContext context)
private boolean checkPcgfPluginLib(final @NotNull PluginProviderContext context)
{
- try
+ String version = PCGF_PluginLibVersionDetection.getVersionBukkit();
+ if (version != null)
{
- Class.forName("at.pcgamingfreaks.PluginLib.Bukkit.PluginLib");
- //if (new Version(pcgfPluginLib.getDescription().getVersion()).olderThan(new Version(MagicValues.MIN_PCGF_PLUGIN_LIB_VERSION)))
- if (true) // TODO check version
+
+ if (new Version(version).olderThan(new Version(MagicValues.MIN_PCGF_PLUGIN_LIB_VERSION)))
{
- context.getLogger().info("PCGF-PluginLib installed. Switching to normal mode!");
+ context.getLogger().info("PCGF-PluginLib to old! Switching to standalone mode!");
+ return true;
}
else
{
- context.getLogger().info("PCGF-PluginLib to old! Switching to standalone mode!");
+ context.getLogger().info("PCGF-PluginLib installed. Switching to normal mode!");
}
- return true;
}
- catch(ClassNotFoundException ignored)
+ else
{
context.getLogger().info("PCGF-PluginLib not installed. Switching to standalone mode!");
}