Null pointer exception at startup
Samahiel opened this issue ยท 1 comments
After a server restart to install unrelated plugin (a listener that changes how TNT explosions are handled), PS threw up the following errors on startup:
2013-10-07 00:31:54 [INFO] [PreciousStones] Enabling PreciousStones v9.6.2-SNAPSHOT
2013-10-07 00:31:54 [SEVERE] Error occurred while enabling PreciousStones v9.6.2-SNAPSHOT (Is it up to date?)
java.lang.NullPointerException
at net.sacredlabyrinth.Phaed.PreciousStones.Helper.toTypeEntriesBlind(Helper.java:687)
at net.sacredlabyrinth.Phaed.PreciousStones.FieldSettings.loadTypeEntries(FieldSettings.java:587)
at net.sacredlabyrinth.Phaed.PreciousStones.FieldSettings.parseSettings(FieldSettings.java:375)
at net.sacredlabyrinth.Phaed.PreciousStones.FieldSettings.(FieldSettings.java:116)
at net.sacredlabyrinth.Phaed.PreciousStones.managers.SettingsManager.addForceFieldStones(SettingsManager.java:442)
at net.sacredlabyrinth.Phaed.PreciousStones.managers.SettingsManager.load(SettingsManager.java:331)
at net.sacredlabyrinth.Phaed.PreciousStones.managers.SettingsManager.(SettingsManager.java:149)
at net.sacredlabyrinth.Phaed.PreciousStones.PreciousStones.onEnable(PreciousStones.java:121)
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:457)
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381)
at org.bukkit.craftbukkit.v1_6_R2.CraftServer.loadPlugin(CraftServer.java:282)
at org.bukkit.craftbukkit.v1_6_R2.CraftServer.enablePlugins(CraftServer.java:264)
at net.minecraft.server.v1_6_R2.MinecraftServer.l(MinecraftServer.java:313)
at net.minecraft.server.v1_6_R2.MinecraftServer.f(MinecraftServer.java:290)
at net.minecraft.server.v1_6_R2.MinecraftServer.a(MinecraftServer.java:250)
at net.minecraft.server.v1_6_R2.DedicatedServer.init(DedicatedServer.java:151)
at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:391)
at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582)
And shutdown:
2013-10-07 00:31:45 [INFO] [PreciousStones] Disabling PreciousStones v9.6.0-SNAPSHOT
2013-10-07 00:31:45 [SEVERE] Error occurred while disabling PreciousStones v9.6.0-SNAPSHOT (Is it up to date?)
java.lang.NullPointerException
at net.sacredlabyrinth.Phaed.PreciousStones.PreciousStones.onDisable(PreciousStones.java:245)
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:219)
at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:481)
at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:400)
at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:393)
at org.bukkit.craftbukkit.v1_6_R2.CraftServer.disablePlugins(CraftServer.java:277)
at net.minecraft.server.v1_6_R2.MinecraftServer.stop(MinecraftServer.java:343)
at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:450)
at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582
Errors continued after TNT plugin was removed, and PS .jar file was replaced with fresh download.
Deleted ../PreciousStones folder and restarted. Issue went away until config file restored from backup and plugin reloaded.
logs:
2013-10-07 19:27:42 [INFO] Error: null
2013-10-07 19:27:42 [INFO] net.sacredlabyrinth.Phaed.PreciousStones.Helper.toTypeEntriesBlind(Helper.java:687)
2013-10-07 19:27:42 [INFO] net.sacredlabyrinth.Phaed.PreciousStones.FieldSettings.loadTypeEntries(FieldSettings.java:587)
2013-10-07 19:27:42 [INFO] net.sacredlabyrinth.Phaed.PreciousStones.FieldSettings.parseSettings(FieldSettings.java:375)
2013-10-07 19:27:42 [INFO] net.sacredlabyrinth.Phaed.PreciousStones.FieldSettings.(FieldSettings.java:116)
2013-10-07 19:27:42 [INFO] net.sacredlabyrinth.Phaed.PreciousStones.managers.SettingsManager.addForceFieldStones(SettingsManager.java:442)
2013-10-07 19:27:42 [INFO] net.sacredlabyrinth.Phaed.PreciousStones.managers.SettingsManager.load(SettingsManager.java:331)
2013-10-07 19:27:42 [INFO] net.sacredlabyrinth.Phaed.PreciousStones.managers.CommandManager.onCommand(CommandManager.java:1807)
2013-10-07 19:27:42 [INFO] org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
2013-10-07 19:27:42 [INFO] org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:192)
2013-10-07 19:27:42 [INFO] org.bukkit.craftbukkit.v1_6_R2.CraftServer.dispatchCommand(CraftServer.java:523)
2013-10-07 19:27:42 [INFO] org.bukkit.craftbukkit.v1_6_R2.CraftServer.dispatchServerCommand(CraftServer.java:512)
2013-10-07 19:27:42 [INFO] net.minecraft.server.v1_6_R2.DedicatedServer.ar(DedicatedServer.java:262)
2013-10-07 19:27:42 [INFO] net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:227)
2013-10-07 19:27:42 [INFO] net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:486)
2013-10-07 19:27:42 [INFO] net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:419)
2013-10-07 19:27:42 [INFO] net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582)
2013-10-07 19:27:42 [INFO] Command not recognized
Update: upon troubleshooting the error seems to be caused by these two field configurations.
Config.yml:
force-field-blocks:
- title: City Protection
block: 138
radius: 60
custom-height: 500
prevent-fire: true
prevent-place: true
prevent-destroy: true
prevent-vehicle-destroy: true
prevent-enderman-destroy: true
prevent-explosions: true
prevent-unprotectable: true
prevent-item-frame-take: true
prevent-flow: true
protect-crops: true
prevent-place-blacklist:
?prevent-destroy-blacklist:- 138
welcome-message: true
farewell-message: true
?prevent-portal-enter: true
?prevent-portal-destination: true
?prevent-portal-create: true
?prevent-vehicle-enter: true
?prevent-vehicle-exit: true
?prevent-teleport: true
command-blacklisting: true
can-change-owner: true
enable-on-src: true
mixing-group: 1
breakable: true
hidable: true
cuboid: true
mask-on-disabled: 80
single-use: true
- 138
- title: admin protection
block: 19
radius: 20
custom-height: 500
prevent-fire: true
prevent-place: true
prevent-destroy: true
prevent-vehicle-destroy: true
prevent-enderman-destroy: true
prevent-explosions: true
prevent-mob-spawn: true
prevent-unprotectable: true
prevent-item-frame-take: true
prevent-flow: true
protect-crops: true
prevent-place-blacklist:
remove-mob: true
?welcome-message: true
?farewell-message: true
?prevent-portal-enter: true
?prevent-portal-destination: true
?prevent-portal-create: true
?prevent-vehicle-enter: true
?prevent-vehicle-exit: true
?prevent-teleport: true
command-blacklisting: true
can-change-owner: false
enable-on-src: true
mixing-group: 1
breakable: false
hidable: true
cuboid: true
mask-on-disabled: 80