Magic

Magic

190k Downloads

Issues with 1.18 config changes in Spigot

Culgor opened this issue · 12 comments

commented

Hello, ive been enjoying the magic plugin for some time now when i decided to switch the multiplayer server jar to paper for performance reasons. it now gives me a message in chat saying "Errors in magic configs, please fix and restart server". When i go to check the logs, i dont know where to start, its a brick wall of things not being able to be loaded. The people playing on my server and I enjoy this plugin very much and i would like to keep the server on paper but dont know how to fix these configs. Here is the latest log, thanks!
latest (1).log

commented

Got the same issue, altough i didnt update anything. Anybody found a fix yet?

[17:30:57] [Server thread/WARN]: [Magic] �[33m Error loading messages�[0m

26 | java.lang.ClassCastException: class com.elmakers.mine.bukkit.configuration.ParameterizedConfigurationSection cannot be cast to class org.bukkit.configuration.SectionPathData (com.elmakers.mine.bukkit.configuration.ParameterizedConfigurationSection is in unnamed module of loader 'Magic-10.4.jar' @2cb83aa9; org.bukkit.configuration.SectionPathData is in unnamed module of loader java.net.URLClassLoader @e2d56bf)
27 | at org.bukkit.configuration.MemorySection.get(MemorySection.java:272) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
28 | at com.elmakers.mine.bukkit.configuration.TranslatingConfigurationSection.get(TranslatingConfigurationSection.java:118) ~[Magic-10.4.jar:?]
29 | at org.bukkit.configuration.MemorySection.contains(MemorySection.java:120) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
30 | at org.bukkit.configuration.MemorySection.get(MemorySection.java:261) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
31 | at com.elmakers.mine.bukkit.configuration.TranslatingConfigurationSection.get(TranslatingConfigurationSection.java:118) ~[Magic-10.4.jar:?]
32 | at org.bukkit.configuration.MemorySection.getString(MemorySection.java:339) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
33 | at org.bukkit.configuration.MemorySection.getString(MemorySection.java:332) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
34 | at com.elmakers.mine.bukkit.utility.ConfigurationUtils.mergeText(ConfigurationUtils.java:271) ~[Magic-10.4.jar:?]
35 | at com.elmakers.mine.bukkit.tasks.ConfigurationLoadTask.processMessageExample(ConfigurationLoadTask.java:639) ~[Magic-10.4.jar:?]
36 | at com.elmakers.mine.bukkit.tasks.ConfigurationLoadTask.loadExampleConfiguration(ConfigurationLoadTask.java:174) ~[Magic-10.4.jar:?]
37 | at com.elmakers.mine.bukkit.tasks.ConfigurationLoadTask.loadExampleConfiguration(ConfigurationLoadTask.java:115) ~[Magic-10.4.jar:?]
38 | at com.elmakers.mine.bukkit.tasks.ConfigurationLoadTask.loadConfigFile(ConfigurationLoadTask.java:526) ~[Magic-10.4.jar:?]
39 | at com.elmakers.mine.bukkit.tasks.ConfigurationLoadTask.run(ConfigurationLoadTask.java:968) ~[Magic-10.4.jar:?]
40 | at com.elmakers.mine.bukkit.tasks.ConfigurationLoadTask.runNow(ConfigurationLoadTask.java:1014) ~[Magic-10.4.jar:?]
41 | at com.elmakers.mine.bukkit.magic.MagicController.loadConfiguration(MagicController.java:2593) ~[Magic-10.4.jar:?]
42 | at com.elmakers.mine.bukkit.magic.MagicController.loadConfiguration(MagicController.java:2570) ~[Magic-10.4.jar:?]
43 | at com.elmakers.mine.bukkit.magic.MagicController.loadConfiguration(MagicController.java:2566) ~[Magic-10.4.jar:?]
44 | at com.elmakers.mine.bukkit.magic.MagicController.loadConfiguration(MagicController.java:2558) ~[Magic-10.4.jar:?]
45 | at com.elmakers.mine.bukkit.magic.MagicController.load(MagicController.java:2632) ~[Magic-10.4.jar:?]
46 | at com.elmakers.mine.bukkit.magic.MagicController.initialize(MagicController.java:1563) ~[Magic-10.4.jar:?]
47 | at com.elmakers.mine.bukkit.magic.MagicPlugin.initialize(MagicPlugin.java:189) ~[Magic-10.4.jar:?]
48 | at com.elmakers.mine.bukkit.magic.MagicPlugin.onEnable(MagicPlugin.java:183) ~[Magic-10.4.jar:?]
49 | at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
50 | at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
51 | at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
52 | at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugin(CraftServer.java:564) ~[paper-1.18.1.jar:git-Paper-126]
53 | at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugins(CraftServer.java:478) ~[paper-1.18.1.jar:git-Paper-126]
54 | at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:286) ~[paper-1.18.1.jar:git-Paper-126]
55 | at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1202) ~[paper-1.18.1.jar:git-Paper-126]
56 | at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.18.1.jar:git-Paper-126]
57 | at java.lang.Thread.run(Thread.java:833) ~[?:?]

commented

I would not recommend to downgrade if you use PaperMC build 119 or higher for at least version 1.18.1.

Build 119 includes an upgrade of log4j 2.17.0 to 2.17.1 for security reasons:
PaperMC/Paper#7227

I have the same error. At first it was not being able to find a base_spell config. After trying to fix it by resetting the configs, all spells seem to give an error. I did update Paper beforehand, so to me, it seems likely that the update contains something which renders the plugin incompatible.

commented

Also experiencing this issue after updating paper

commented
commented

Tried downgrading but now that just crashes the server.

commented

I went from the latest Paper build to build 119 (for version 1.18.1). That fixed the issue. Build 119 does include the log4j patch.

I assume therefore that PaperMC/Paper@3a43821 includes the conflicting update (build 120).

commented

How would you change the build for a hosting service like apexmc? My options are just the versions in a dropdown menu.

commented

This PaperMC build should work for 1.18.1: https://papermc.io/api/v2/projects/paper/versions/1.18.1/builds/119/downloads/paper-1.18.1-119.jar
It includes the log4j patch. This is the 119 build I mentioned before (and works for me).

commented

@Culgor With apexmc you can set a custom jar, but I wouldn't recommend going to an older version without the log4j patches

commented

Sorry, everyone, I've been on vacation, and whatever this is was kind of a nasty curveball. I'll see if I can find a fix or workaround today.

commented

I think I have a fix for this, but my power is currently out, so

  1. I can't spare the battery power to test the fix fully (Minecraft is a battery killer)
  2. My build server is down so you won't be able to get a build

Hopefully as soon as my power is back on I can do some testing to make sure nothing is broken and then make an official release as 10.5.

On the bright side, this all happened because Bukkit now supports saving comments in config files, which is actually a really nice change.

commented

This should be fixed in Magic 10.5, just released.