如果这么写就会报错不填toString则返回null,getLore正常获取 求解
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:72) ~[Paper.jar:git-Paper-1617]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[Paper.jar:git-Paper-1617]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[Paper.jar:git-Paper-1617]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:513) ~[Paper.jar:git-Paper-1617]
at net.minecraft.server.v1_12_R1.EntityItem.d(EntityItem.java:366) ~[Paper.jar:git-Paper-1617]
at net.minecraft.server.v1_12_R1.EntityHuman.c(EntityHuman.java:426) ~[Paper.jar:git-Paper-1617]
at net.minecraft.server.v1_12_R1.EntityHuman.n(EntityHuman.java:401) ~[Paper.jar:git-Paper-1617]
at net.minecraft.server.v1_12_R1.EntityLiving.B_(EntityLiving.java:2024) ~[Paper.jar:git-Paper-1617]
at net.minecraft.server.v1_12_R1.EntityHuman.B_(EntityHuman.java:146) ~[Paper.jar:git-Paper-1617]
at net.minecraft.server.v1_12_R1.EntityPlayer.playerTick(EntityPlayer.java:343) ~[Paper.jar:git-Paper-1617]
at net.minecraft.server.v1_12_R1.PlayerConnection.e(PlayerConnection.java:145) ~[Paper.jar:git-Paper-1617]
at net.minecraft.server.v1_12_R1.NetworkManager.a(NetworkManager.java:273) ~[Paper.jar:git-Paper-1617]
at net.minecraft.server.v1_12_R1.ServerConnection.c(ServerConnection.java:150) ~[Paper.jar:git-Paper-1617]
at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:948) ~[Paper.jar:git-Paper-1617]
at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:423) ~[Paper.jar:git-Paper-1617]
at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:774) ~[Paper.jar:git-Paper-1617]
at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:666) ~[Paper.jar:git-Paper-1617]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_211]
Caused by: java.lang.NullPointerException
at mcfox.club.event.PickupEvent.onItemDeath(PickupEvent.java:28) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor207.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:70) ~[Paper.jar:git-Paper-1617]
... 17 more
|