From 97cea0d8ca7894c5b96146e5ee061f78cb743339 Mon Sep 17 00:00:00 2001 From: lewmilburn <63267144+lewmilburn@users.noreply.github.com> Date: Wed, 29 May 2024 12:40:47 +0100 Subject: [PATCH] Fix Luminol support & fix KOS error. --- src/main/java/net/lewmc/kryptonite/Kryptonite.java | 12 +++++++++++- src/main/java/net/lewmc/kryptonite/kos/KOS.java | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/lewmc/kryptonite/Kryptonite.java b/src/main/java/net/lewmc/kryptonite/Kryptonite.java index d0db600..816b4ce 100644 --- a/src/main/java/net/lewmc/kryptonite/Kryptonite.java +++ b/src/main/java/net/lewmc/kryptonite/Kryptonite.java @@ -5,6 +5,7 @@ import net.lewmc.kryptonite.commands.OptimiseCommand; import net.lewmc.kryptonite.utils.LogUtil; import net.lewmc.kryptonite.utils.UpdateUtil; +import org.bukkit.plugin.Plugin; import org.bukkit.plugin.java.JavaPlugin; import java.io.File; @@ -23,6 +24,7 @@ public enum Software { PUFFERFISH } public Software server = Software.UNKNOWN; + public String[] badPlugins; @Override public void onEnable() { @@ -42,6 +44,7 @@ public void onEnable() { this.initFilesystem(); this.loadCommands(); this.checkSoftware(); + this.detectBadPlugins(); this.log.info("Startup completed."); } @@ -116,8 +119,15 @@ private void checkSoftware() { this.log.info("Detected server jar: Pufferfish."); } else { this.server = Software.UNKNOWN; - this.log.info("Detected server jar: Unknown."); + this.log.info("You are running unsupported server jar: "+this.getServer().getName()); this.log.severe("This plugin may not work as expected."); } } + + private void detectBadPlugins() { + Plugin[] plugins = this.getServer().getPluginManager().getPlugins(); + for (Plugin p : plugins) { + this.log.info("Running plugin: "+p.getName()); + } + } } diff --git a/src/main/java/net/lewmc/kryptonite/kos/KOS.java b/src/main/java/net/lewmc/kryptonite/kos/KOS.java index 106381f..b5c93a5 100644 --- a/src/main/java/net/lewmc/kryptonite/kos/KOS.java +++ b/src/main/java/net/lewmc/kryptonite/kos/KOS.java @@ -26,7 +26,7 @@ public KOS(CommandSender cs, Kryptonite plugin) { this.softwareUtil = new SoftwareUtil(this.plugin); ConfigurationUtil config = new ConfigurationUtil(this.plugin, cs); - this.patches = config.load("plugins/Kryptonite/YouHaveTrouble.kos"); + this.patches = config.load("plugins/Kryptonite/profiles/YouHaveTrouble.kos"); this.kosconfig = config.load("plugins/Kryptonite/config.yml"); }