mlus-asuka / PlayerSync

This is a Minecraft forge mod using Mysql backend to make player data synchronization between different servers.
GNU General Public License v3.0
5 stars 1 forks source link

[1.20.1] 报错:`java.lang.NumberFormatException: For input string: ""` #23

Closed BredyAK closed 1 month ago

BredyAK commented 1 month ago

目前只要玩家加入服务器就会刷一条这样的 Warn 消息,很恼人。例如:

[12:36:31 INFO]: BredyAK[/***.***.***.***:***] logged in with entity id 207 at ([world]-9.675159874276543, 75.0, 8.699999988079071)
[12:36:31 WARN]: java.lang.NumberFormatException: For input string: ""
[12:36:31 WARN]:        at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
[12:36:31 WARN]:        at java.base/java.lang.Integer.parseInt(Integer.java:672)
[12:36:31 WARN]:        at java.base/java.lang.Integer.parseInt(Integer.java:778)
[12:36:31 WARN]:        at TRANSFORMER/playersync@1.20.1-1.3.3/vip.fubuki.playersync.util.LocalJsonUtil.StringToEntryMap(LocalJsonUtil.java:28)
[12:36:31 WARN]:        at TRANSFORMER/playersync@1.20.1-1.3.3/vip.fubuki.playersync.sync.ModsSupport.onPlayerJoin(ModsSupport.java:36)
[12:36:31 WARN]:        at TRANSFORMER/playersync@1.20.1-1.3.3/vip.fubuki.playersync.sync.VanillaSync.doPlayerJoin(VanillaSync.java:136)
[12:36:31 WARN]:        at TRANSFORMER/playersync@1.20.1-1.3.3/vip.fubuki.playersync.sync.VanillaSync.lambda$onPlayerJoin$0(VanillaSync.java:146)
[12:36:31 WARN]:        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
[12:36:31 WARN]:        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
[12:36:31 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[12:36:31 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[12:36:31 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1583)
mlus-asuka commented 1 month ago

https://github.com/mlus-asuka/PlayerSync/actions/runs/11267803381

BredyAK commented 1 month ago

https://github.com/mlus-asuka/PlayerSync/actions/runs/11267803381

经过测试,还是一模一样的错误……

mlus-asuka commented 1 month ago

https://github.com/mlus-asuka/PlayerSync/actions/runs/11272466275

BredyAK commented 1 month ago

已修复,感谢作者!