Config.yml to config.yaml issue when upgrading
pschapman opened this issue · 5 comments
Upgrading from 1.0.0. to 2.0.x does not transfer settings. I get that not all features survived the upgrade. Change will be easier if equivalencies are recognized and automatically imported.
Old: PortalProtectionArea: 1
New: portalProtectionRaduis: 5
<-- Note misspelling of radius
Inline documentation is also absent.
Hi -
Edit:
Error message below occurs if config.yaml
is non-existant (e.g. fresh upgrade). Created an empty config.yaml
file, then restarted the server. Default config was displayed. Ran /portal import confirm
after start, but only portals and destinations are imported.
Key items for me:
- portalProtectionRaduis [sic]
- enableProxySupport
Added custom build you provided to my server. AP plugin failed to load with the following message:
[03:05:09] [Server thread/INFO]: [AdvancedPortals] Enabling AdvancedPortals v2.0.3-config-import-81f5df2b
[03:05:09] [Server thread/INFO]: [AdvancedPortals] Loading Advanced Portals Core v2.0.3-config-import-81f5df2b for MC: 1.21.4
[03:05:10] [Server thread/INFO]: [AdvancedPortals] Importing old destinations from destinations.yml
[03:05:10] [Server thread/INFO]: [AdvancedPortals] Importing old portals from portals.yml
[03:05:10] [Server thread/ERROR]: Error occurred while enabling AdvancedPortals v2.0.3-config-import-81f5df2b (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "com.sekwah.advancedportals.core.serializeddata.DataStorage.storeFile(Object, String)" because "this.dataStorage" is null
at com.sekwah.advancedportals.core.repository.impl.ConfigRepositoryImpl.storeConfig(ConfigRepositoryImpl.java:159) ~[?:?]
at com.sekwah.advancedportals.core.repository.impl.ConfigRepositoryImpl.importConfig(ConfigRepositoryImpl.java:164) ~[?:?]
at com.sekwah.advancedportals.spigot.importer.LegacyImporter.importConfig(LegacyImporter.java:184) ~[?:?]
at com.sekwah.advancedportals.spigot.AdvancedPortalsPlugin.checkAndCreateConfig(AdvancedPortalsPlugin.java:121) ~[?:?]
at com.sekwah.advancedportals.spigot.AdvancedPortalsPlugin.onEnable(AdvancedPortalsPlugin.java:83) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:267) ~[spigot-api-1.21.4-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot-api-1.21.4-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:492) ~[spigot-api-1.21.4-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_21_R3.CraftServer.enablePlugin(CraftServer.java:579) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4402-Spigot-33ece3e-665900b]
at org.bukkit.craftbukkit.v1_21_R3.CraftServer.enablePlugins(CraftServer.java:493) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4402-Spigot-33ece3e-665900b]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:656) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4402-Spigot-33ece3e-665900b]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:441) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4402-Spigot-33ece3e-665900b]
at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:268) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4402-Spigot-33ece3e-665900b]
at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1032) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4402-Spigot-33ece3e-665900b]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4402-Spigot-33ece3e-665900b]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
-PSC
Due to a lot of changes I didn't port the config importing. Though I will add it to the command to pull what it can as we can read the old files.
Advanced-Portals-2.0.3-config-import-81f5df2b.jar.zip
Hey could you give this a go. It will overwrite your config but should import all the supported values
Im off ill mostly atm so wont be checking here till I've recovered but can you check the latest release and see if that issue still happens? I wasn't able to re-create the error you sent at least with that build.
I need to take a look into if there is a nice way to re-add inline documentation with snakeyaml though I think we may just supplement that with documentation on the website.