shaokeyibb / RankFight

A simple but helpful fight plugin with rank support
GNU General Public License v3.0
5 stars 0 forks source link

設定積分物品出現錯誤 #1

Open minexo79 opened 3 years ago

minexo79 commented 3 years ago

我稍早安裝此款插件,在設定積分物品時出現這樣的錯誤,並且在重新載入之後也持續報錯。 重新啟動伺服器之後發現會殘留上次設定的"最後一款物品"。且查看plugins資料夾也沒發現到有儲存檔案的跡象。 image

系統資訊

RAM: 8GB
CPU: 4 Core
Java Docker Image: ghcr.io/pterodactyl/yolks:java_16
Server: Purpur-1393 (MC: 1.17.1)

錯誤訊息

[14:22:07] [Server thread/INFO]: minexo79 issued server command: /rankfight shop
[14:22:07] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'rankfight' in plugin RankFight v1.1-SNAPSHOT
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[patched_1.17.1.jar:git-Purpur-1393]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:172) ~[patched_1.17.1.jar:git-Purpur-1393]
    at org.bukkit.craftbukkit.v1_17_R1.CraftServer.dispatchCommand(CraftServer.java:838) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.network.PlayerConnection.handleCommand(PlayerConnection.java:2339) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2150) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2131) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.network.protocol.game.PacketPlayInChat.a(PacketPlayInChat.java:46) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.network.protocol.game.PacketPlayInChat.a(PacketPlayInChat.java:6) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$ensureRunningOnSameThread$1(PlayerConnectionUtils.java:56) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.TickTask.run(TickTask.java:18) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.util.thread.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:149) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.executeTask(IAsyncTaskHandlerReentrant.java:23) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer.java:1433) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer.java:192) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.util.thread.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:122) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.MinecraftServer.bf(MinecraftServer.java:1411) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.MinecraftServer.executeNext(MinecraftServer.java:1404) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.util.thread.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:132) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.MinecraftServer.sleepForTick(MinecraftServer.java:1382) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1293) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321) ~[patched_1.17.1.jar:git-Purpur-1393]
    at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.meta.ItemMeta.hasLore()" because "meta" is null
    at io.hikarilan.rankfight.gui.ShopGUI.lambda$getShopGUI$0(ShopGUI.java:31) ~[RankFight-1.1.3-SNAPSHOT.jar:?]
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
    at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1694) ~[?:?]
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[?:?]
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:550) ~[?:?]
    at java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260) ~[?:?]
    at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616) ~[?:?]
    at io.hikarilan.rankfight.gui.ShopGUI.getShopGUI(ShopGUI.java:42) ~[RankFight-1.1.3-SNAPSHOT.jar:?]
    at io.hikarilan.rankfight.gui.ShopGUI.openShopGUI(ShopGUI.java:47) ~[RankFight-1.1.3-SNAPSHOT.jar:?]
    at io.hikarilan.rankfight.commands.RankFightCommand.invokeUserCommand(RankFightCommand.java:312) ~[RankFight-1.1.3-SNAPSHOT.jar:?]
    at io.hikarilan.rankfight.commands.RankFightCommand.onCommand(RankFightCommand.java:44) ~[RankFight-1.1.3-SNAPSHOT.jar:?]
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[patched_1.17.1.jar:git-Purpur-1393]
    ... 21 more
[14:22:15] [Server thread/INFO]: minexo79 issued server command: /rankfight admin reload
[14:22:15] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'rankfight' in plugin RankFight v1.1-SNAPSHOT
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[patched_1.17.1.jar:git-Purpur-1393]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:172) ~[patched_1.17.1.jar:git-Purpur-1393]
    at org.bukkit.craftbukkit.v1_17_R1.CraftServer.dispatchCommand(CraftServer.java:838) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.network.PlayerConnection.handleCommand(PlayerConnection.java:2339) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2150) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2131) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.network.protocol.game.PacketPlayInChat.a(PacketPlayInChat.java:46) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.network.protocol.game.PacketPlayInChat.a(PacketPlayInChat.java:6) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$ensureRunningOnSameThread$1(PlayerConnectionUtils.java:56) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.TickTask.run(TickTask.java:18) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.util.thread.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:149) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.executeTask(IAsyncTaskHandlerReentrant.java:23) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer.java:1433) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer.java:192) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.util.thread.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:122) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.MinecraftServer.bf(MinecraftServer.java:1411) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.MinecraftServer.executeNext(MinecraftServer.java:1404) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.util.thread.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:132) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.MinecraftServer.sleepForTick(MinecraftServer.java:1382) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1293) ~[patched_1.17.1.jar:git-Purpur-1393]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321) ~[patched_1.17.1.jar:git-Purpur-1393]
    at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.meta.ItemMeta.getDisplayName()" because the return value of "org.bukkit.inventory.ItemStack.getItemMeta()" is null
    at io.hikarilan.rankfight.beans.ItemGift.lambda$saveAll$3(ItemGift.java:51) ~[RankFight-1.1.3-SNAPSHOT.jar:?]
    at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
    at io.hikarilan.rankfight.beans.ItemGift.saveAll(ItemGift.java:50) ~[RankFight-1.1.3-SNAPSHOT.jar:?]
    at io.hikarilan.rankfight.commands.RankFightCommand.invokeAdminCommand(RankFightCommand.java:233) ~[RankFight-1.1.3-SNAPSHOT.jar:?]
    at io.hikarilan.rankfight.commands.RankFightCommand.onCommand(RankFightCommand.java:42) ~[RankFight-1.1.3-SNAPSHOT.jar:?]
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[patched_1.17.1.jar:git-Purpur-1393]
    ... 21 more
shaokeyibb commented 3 years ago

重新啟動伺服器之後發現會殘留上次設定的"最後一款物品"

能否詳細描述一下這句話的具體情況嗎?