Stargate Rewritten

Stargate Rewritten

241 Downloads

Unified Legacy Crashes on Load

Pheotis opened this issue ยท 2 comments

commented
[16:46:34] [Server thread/INFO]: [Stargate] Enabling Stargate v0.11.5.1
[16:46:34] [Server thread/INFO]: [Stargate::LanguageLoader] Created language folder
[16:46:34] [Server thread/ERROR]: Error occurred while enabling Stargate v0.11.5.1 (Is it up to date?)
java.lang.NoClassDefFoundError: net/md_5/bungee/api/ChatColor
	at net.knarcraft.knarlib.util.ColorHelper.translateColorCodes(ColorHelper.java:75) ~[?:?]
	at net.knarcraft.knarlib.util.FileHelper.readKeyValuePairs(FileHelper.java:123) ~[?:?]
	at net.knarcraft.stargate.config.LanguageLoader.load(LanguageLoader.java:226) ~[?:?]
	at net.knarcraft.stargate.config.LanguageLoader.<init>(LanguageLoader.java:45) ~[?:?]
	at net.knarcraft.stargate.config.StargateConfig.<init>(StargateConfig.java:65) ~[?:?]
	at net.knarcraft.stargate.Stargate.onEnable(Stargate.java:353) ~[?:?]
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:266) ~[bukkit-1.19.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:334) ~[bukkit-1.19.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:479) ~[bukkit-1.19.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_19_R3.CraftServer.enablePlugin(CraftServer.java:520) ~[craftbukkit-1.19.4-R0.1-SNAPSHOT.jar:3737-Bukkit-f92a41c]
	at org.bukkit.craftbukkit.v1_19_R3.CraftServer.enablePlugins(CraftServer.java:446) ~[craftbukkit-1.19.4-R0.1-SNAPSHOT.jar:3737-Bukkit-f92a41c]
	at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:581) ~[craftbukkit-1.19.4-R0.1-SNAPSHOT.jar:3737-Bukkit-f92a41c]
	at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:406) ~[craftbukkit-1.19.4-R0.1-SNAPSHOT.jar:3737-Bukkit-f92a41c]
	at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:237) ~[craftbukkit-1.19.4-R0.1-SNAPSHOT.jar:3737-Bukkit-f92a41c]
	at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:954) ~[craftbukkit-1.19.4-R0.1-SNAPSHOT.jar:3737-Bukkit-f92a41c]
	at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:296) ~[craftbukkit-1.19.4-R0.1-SNAPSHOT.jar:3737-Bukkit-f92a41c]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.ClassNotFoundException: net.md_5.bungee.api.ChatColor
	at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:147) ~[bukkit-1.19.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:99) ~[bukkit-1.19.4-R0.1-SNAPSHOT.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
	... 17 more
commented

What is this running? If it's Bukkit, that's expected as net.md_5.bungee.api.ChatColor doesn't exist in a CraftBukkit .jar file.
If it's Spigot or Paper, that should be impossible.

commented

This appears to have been from a user running a CraftBukkit build without a startup script.
Windows 10, Java 17, Minecraft 1.19.4.

Upgrading to paper without a startup script failed to fix the issue; adding a startup script (on paper) resolved this problem.
I think some of this confusion came from the fact that SG was CB-compatible for a while.
Perhaps we should add something so that running on CB gracefully fails (i.e. shuts down with a clearer error)?