PwnPlantGrowth

PwnPlantGrowth

15.5k Downloads

NullPointerException thrown using bonemeal on sapling

hemebond opened this issue ยท 3 comments

commented

Testing out plugin on SpigotMC 1.14.4

[23:38:49] [Server thread/INFO]: Starting minecraft server version 1.14.4
[23:38:49] [Server thread/INFO]: Loading properties
[23:38:49] [Server thread/INFO]: This server is running CraftBukkit version git-Spigot-9de398a-8b09d98 (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)

Tested all saplings and used bonemeal until they grew.

All of them grew, ignoring the restrictions in config.yml, and NullPointerException thrown.

[23:39:26] [Server thread/ERROR]: Could not pass event StructureGrowEvent to PwnPlantGrowth v2.5.0
org.bukkit.event.EventException: null
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:320) ~[spigot-1.14.4.jar:git-Spigot-9de398a-8b09d98]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-1.14.4.jar:git-Spigot-9de398a-8b09d98]
	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:529) ~[spigot-1.14.4.jar:git-Spigot-9de398a-8b09d98]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:514) ~[spigot-1.14.4.jar:git-Spigot-9de398a-8b09d98]
	at net.minecraft.server.v1_14_R1.ItemStack.placeItem(ItemStack.java:174) ~[spigot-1.14.4.jar:git-Spigot-9de398a-8b09d98]
	at net.minecraft.server.v1_14_R1.PlayerInteractManager.a(PlayerInteractManager.java:468) ~[spigot-1.14.4.jar:git-Spigot-9de398a-8b09d98]
	at net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:1238) ~[spigot-1.14.4.jar:git-Spigot-9de398a-8b09d98]
	at net.minecraft.server.v1_14_R1.PacketPlayInUseItem.a(PacketPlayInUseItem.java:27) ~[spigot-1.14.4.jar:git-Spigot-9de398a-8b09d98]
	at net.minecraft.server.v1_14_R1.PacketPlayInUseItem.a(PacketPlayInUseItem.java:1) ~[spigot-1.14.4.jar:git-Spigot-9de398a-8b09d98]
	at net.minecraft.server.v1_14_R1.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:19) ~[spigot-1.14.4.jar:git-Spigot-9de398a-8b09d98]
	at net.minecraft.server.v1_14_R1.TickTask.run(SourceFile:18) [spigot-1.14.4.jar:git-Spigot-9de398a-8b09d98]
	at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeTask(SourceFile:144) [spigot-1.14.4.jar:git-Spigot-9de398a-8b09d98]
	at net.minecraft.server.v1_14_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) [spigot-1.14.4.jar:git-Spigot-9de398a-8b09d98]
	at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeNext(SourceFile:118) [spigot-1.14.4.jar:git-Spigot-9de398a-8b09d98]
	at net.minecraft.server.v1_14_R1.MinecraftServer.aX(MinecraftServer.java:910) [spigot-1.14.4.jar:git-Spigot-9de398a-8b09d98]
	at net.minecraft.server.v1_14_R1.MinecraftServer.executeNext(MinecraftServer.java:903) [spigot-1.14.4.jar:git-Spigot-9de398a-8b09d98]
	at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.awaitTasks(SourceFile:127) [spigot-1.14.4.jar:git-Spigot-9de398a-8b09d98]
	at net.minecraft.server.v1_14_R1.MinecraftServer.sleepForTick(MinecraftServer.java:887) [spigot-1.14.4.jar:git-Spigot-9de398a-8b09d98]
	at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:820) [spigot-1.14.4.jar:git-Spigot-9de398a-8b09d98]
	at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.NullPointerException
	at com.pwn9.PwnPlantGrowth.StructureGrowListener.structureGrow(StructureGrowListener.java:112) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:316) ~[spigot-1.14.4.jar:git-Spigot-9de398a-8b09d98]
	... 19 more

Found the log files:

==> ./pwnplantgrowth.log <==
[2019/07/21 23:58:03] Growing: UNKNOWN_BLOCK
[2019/07/21 23:58:03] Growing: UNKNOWN_BLOCK
[2019/07/21 23:58:03] Growing: UNKNOWN_BLOCK
[2019/07/21 23:58:03] Growing: UNKNOWN_BLOCK
[2019/07/21 23:58:03] Growing: UNKNOWN_BLOCK
[2019/07/21 23:58:03] Growing: UNKNOWN_BLOCK
[2019/07/21 23:58:03] Growing: UNKNOWN_BLOCK
[2019/07/21 23:58:03] Growing: UNKNOWN_BLOCK
[2019/07/21 23:59:21] PwnPlantGrowth Disabled
[2019/07/22 00:00:03] PwnPlantGrowth Enabled

==> ./StructureGrow.log <==
[2019/07/21 23:56:49] Structure Event for: JUNGLE_SAPLING - In biome: MOUNTAINS
[2019/07/21 23:56:49] Species: TREE
[2019/07/21 23:58:04] Structure Event for: OAK_SAPLING - In biome: MOUNTAINS
[2019/07/21 23:58:04] Species: TREE
[2019/07/22 00:01:21] Structure Event for: OAK_SAPLING - In biome: MOUNTAINS
[2019/07/22 00:01:21] Species: TREE
[2019/07/22 00:01:37] Structure Event for: JUNGLE_SAPLING - In biome: MOUNTAINS
[2019/07/22 00:01:37] Species: TREE
commented

oh boy, probably! I've been sidelined the last few months, I need to get back in and update these plugins.. nice catch

commented

fixing that line, will update plugin on bukkit/spigot sometime this evening.

commented

Is it possibly an issue with this line?

PwnPlantGrowth.uvenabled = PwnPlantGrowth.instance.getConfig().getBoolean("limit_bonemeal", false);