Skip to content

Commit

Permalink
Fix Luminol support & fix KOS error.
Browse files Browse the repository at this point in the history
  • Loading branch information
lewmilburn committed May 29, 2024
1 parent ccc1758 commit 97cea0d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion src/main/java/net/lewmc/kryptonite/Kryptonite.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -23,6 +24,7 @@ public enum Software {
PUFFERFISH
}
public Software server = Software.UNKNOWN;
public String[] badPlugins;

@Override
public void onEnable() {
Expand All @@ -42,6 +44,7 @@ public void onEnable() {
this.initFilesystem();
this.loadCommands();
this.checkSoftware();
this.detectBadPlugins();

this.log.info("Startup completed.");
}
Expand Down Expand Up @@ -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());
}
}
}
2 changes: 1 addition & 1 deletion src/main/java/net/lewmc/kryptonite/kos/KOS.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit 97cea0d

Please sign in to comment.