Inconsistencies in configuration
Some settings are commented out by default, and all settings have a default value attached, indicating that the all settings are able to be commented out, and if so, the default value would be applied, however;
If the setting config.scheduler_threads
is commented out, the plugin will fail to enable.
It does seem clear enough on a fresh install, but as time goes on you, forget which settings you've defined and which settings were defined by default, which is what happened in my case. It took me a while to figure out as I initially thought that I had changed a setting in the server configuration that had conflicted with the plugin.
Stacktrace
[21:39:28 ERROR]: Error occurred while enabling DHSupport v0.11.0-SNAPSHOT (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "no.jckf.dhsupport.core.configuration.Configuration.getInt(String)" is null
at DistantHorizonsSupport-0.11.0-SNAPSHOT.jar/no.jckf.dhsupport.bukkit.BukkitScheduler.<init>(BukkitScheduler.java:45) ~[DistantHorizonsSupport-0.11.0-SNAPSHOT.jar:?]
at DistantHorizonsSupport-0.11.0-SNAPSHOT.jar/no.jckf.dhsupport.bukkit.DhSupportBukkitPlugin.onEnable(DhSupportBukkitPlugin.java:76) ~[DistantHorizonsSupport-0.11.0-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:280) ~[leaf-api-1.21.8-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202) ~[leaf-1.21.8.jar:1.21.8-106-7267d33]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[leaf-1.21.8.jar:1.21.8-106-7267d33]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:519) ~[leaf-api-1.21.8-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:671) ~[leaf-1.21.8.jar:1.21.8-106-7267d33]
at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:627) ~[leaf-1.21.8.jar:1.21.8-106-7267d33]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:744) ~[leaf-1.21.8.jar:1.21.8-106-7267d33]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:489) ~[leaf-1.21.8.jar:1.21.8-106-7267d33]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:332) ~[leaf-1.21.8.jar:1.21.8-106-7267d33]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1186) ~[leaf-1.21.8.jar:1.21.8-106-7267d33]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:298) ~[leaf-1.21.8.jar:1.21.8-106-7267d33]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]