flinbein / PowerNBT

[MineCraft] Minecraft PowerNBT plugin
https://www.spigotmc.org/resources/powernbt.9098/
MIT License
39 stars 25 forks source link

java.lang.NullPointerException on Load Plugin #40

Closed ghost closed 2 years ago

ghost commented 2 years ago

Fails to load Plugin on Server with Purpur 1.18.1

org.bukkit.plugin.InvalidPluginException: java.lang.NullPointerException: Cannot invoke "Object.toString()" because the return value of "java.util.Map$Entry.getKey()" is null
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:157) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:414) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:322) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_18_R1.CraftServer.loadPlugins(CraftServer.java:421) ~[purpur-1.18.jar:git-Purpur-1433]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:318) ~[purpur-1.18.jar:git-Purpur-1433]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1215) ~[purpur-1.18.jar:git-Purpur-1433]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[purpur-1.18.jar:git-Purpur-1433]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "Object.toString()" because the return value of "java.util.Map$Entry.getKey()" is null
        at org.bukkit.configuration.file.YamlConfiguration.convertMapsToSections(YamlConfiguration.java:78) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.configuration.file.YamlConfiguration.convertMapsToSections(YamlConfiguration.java:82) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.configuration.file.YamlConfiguration.convertMapsToSections(YamlConfiguration.java:82) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.configuration.file.YamlConfiguration.convertMapsToSections(YamlConfiguration.java:82) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:72) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:160) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(YamlConfiguration.java:217) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.reloadConfig(JavaPlugin.java:165) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.getConfig(JavaPlugin.java:134) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?]
        at me.dpohvar.powernbt.PowerNBT.<init>(PowerNBT.java:42) ~[PowerNBT.jar:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
        at java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128) ~[?:?]
        at jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347) ~[?:?]
        at java.lang.Class.newInstance(Class.java:645) ~[?:?]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:83) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:153) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?]
        ... 7 more
DPOH-VAR commented 2 years ago

PowerNBT is not tested with Purpur. I will try to fix it

DPOH-VAR commented 2 years ago

@ThorinRS what is your version of PowerNBT?

ghost commented 2 years ago

@ThorinRS what is your version of PowerNBT?

The latest version (1.1.4).

DPOH-VAR commented 2 years ago

@ThorinRS I can not reproduce with git-Purpur-1564 (MC: 1.18.1) & PowerNBT 1.1.4

If it helps I will release a next version with patch.

ghost commented 2 years ago

@ThorinRS I can not reproduce with git-Purpur-1564 (MC: 1.18.1) & PowerNBT 1.1.4

If it helps I will release a next version with patch.

With this snapshot, on boot purpur drop this:

Error occurred while enabling PowerNBT vix_npe_40-0.8.4.1-g9470364-78-SNAPSHOT (Is it up to date?) java.lang.NullPointerException: Cannot invoke "Object.toString()" because the return value of "java.util.Map$Entry.getKey()" is null at org.bukkit.configuration.file.YamlConfiguration.convertMapsToSections(YamlConfiguration.java:78) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?] at org.bukkit.configuration.file.YamlConfiguration.convertMapsToSections(YamlConfiguration.java:82) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?] at org.bukkit.configuration.file.YamlConfiguration.convertMapsToSections(YamlConfiguration.java:82) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?] at org.bukkit.configuration.file.YamlConfiguration.convertMapsToSections(YamlConfiguration.java:82) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?] at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:72) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?] at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:160) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?] at org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(YamlConfiguration.java:217) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.java.JavaPlugin.reloadConfig(JavaPlugin.java:165) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.java.JavaPlugin.getConfig(JavaPlugin.java:134) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?] at me.dpohvar.powernbt.PowerNBT.onEnable(PowerNBT.java:141) ~[PowerNBT-fix_npe_40-0.8.4.1-g9470364-78.jar:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[purpur-api-1.18-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugin(CraftServer.java:563) ~[purpur-1.18.jar:git-Purpur-1433] at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugins(CraftServer.java:477) ~[purpur-1.18.jar:git-Purpur-1433] at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:730) ~[purpur-1.18.jar:git-Purpur-1433] at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:506) ~[purpur-1.18.jar:git-Purpur-1433] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:347) ~[purpur-1.18.jar:git-Purpur-1433] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1215) ~[purpur-1.18.jar:git-Purpur-1433] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[purpur-1.18.jar:git-Purpur-1433] at java.lang.Thread.run(Thread.java:833) ~[?:?]

DPOH-VAR commented 2 years ago

good news! Reproduced in git-Paper-112 (MC: 1.18.1)

DPOH-VAR commented 2 years ago

fixed https://github.com/flinbein/PowerNBT/releases/tag/v1.1.4.1

ghost commented 2 years ago

I'm sorry to bother you so much, I put it here because I suppose it has to do with my using PURPUR and I see a relationship with the above.

When I try to execute any command the console says:

[PowerNBT] NoClassDefFoundError: Could not initialize class me.dpohvar.powernbt.api.NBTManager

DPOH-VAR commented 2 years ago

Please enable debug mode in plugins/PowerNBT/config.yml

debug: true

and snow me error again and list of plugins

noah1234fgfdgdsgsgf commented 2 years ago

:)

hkkongou commented 2 years ago

same here plugin cannot use