fix: Fix dependency load from versions 1.8-1.10

This commit is contained in:
tjtanjin 2023-12-21 23:21:09 +08:00
parent 184da3d796
commit 682eec4212
2 changed files with 4 additions and 2 deletions

View File

@ -7,7 +7,7 @@
<groupId>quicktax</groupId>
<artifactId>quicktax</artifactId>
<version>1.5.0</version>
<version>1.5.1</version>
<name>QuickTax</name>

View File

@ -83,7 +83,9 @@ public class Main extends JavaPlugin {
// Optional: Add custom charts
metrics.addCustomChart(new Metrics.SimplePie("chart_id", () -> "My value"));
if (Bukkit.getVersion().contains("1.11") || Bukkit.getVersion().contains("1.12")) {
if (Bukkit.getVersion().contains("1.8") || Bukkit.getVersion().contains("1.9")
|| Bukkit.getVersion().contains("1.10") || Bukkit.getVersion().contains("1.11")
|| Bukkit.getVersion().contains("1.12")) {
Bukkit.getScheduler().runTaskLater(this, this::loadDependencies, 1);
} else {
this.getServer().getPluginManager().registerEvents(new DependencyLoadEvent(this), this);