akemin-dayo / BlueMapSkinSupport

Adds proper offline skin acquisition support to BlueMap's web UI.
MIT License
8 stars 3 forks source link

Crash on newer versions of SkinsRestorer #4

Closed camarokris closed 2 years ago

camarokris commented 3 years ago

Server Type: Paper 1.17.1 build 196 (affects all builds though)

I am running a java server that also uses Geyser/Floodgate to allow Bedrock players to join. Floodgate appends a prefix to bedrock users to avoid confusion and let admins know who is java and who is bedrock as management differs a bit. The prefix is set in the floodgate config and on my server it is a period (the default). This causes the following error when a bedrock player logs in:

[14:37:59] [Craft Scheduler Thread - 7299/INFO]: [BlueMapOfflinePlayerMarkers] Marker for .bordbama removed
[14:38:05] [Craft Scheduler Thread - 7299/ERROR]: [BlueMapOfflineSkinSupport] An error occurred while attempting to acquire the SkinsRestorer skin data for .bordbama's true skin!
[14:38:05] [Craft Scheduler Thread - 7299/WARN]: net.skinsrestorer.shared.exception.ReflectionException: java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "obj" is null
[14:38:05] [Craft Scheduler Thread - 7299/WARN]:        at SkinsRestorer.jar//net.skinsrestorer.shared.utils.ReflectionUtil.invokeMethod(ReflectionUtil.java:296)
[14:38:05] [Craft Scheduler Thread - 7299/WARN]:        at BlueMapOfflineSkinSupport-1.2.jar//ai.akemi.bluemapofflineskinsupport.BlueMapOfflineSkinSupport.lambda$writeTrueCompositedPlayerHeadForBukkitPlayerAsynchronousCallback$0(BlueMapOfflineSkinSupport.java:124)
[14:38:05] [Craft Scheduler Thread - 7299/WARN]:        at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:101)
[14:38:05] [Craft Scheduler Thread - 7299/WARN]:        at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54)
[14:38:05] [Craft Scheduler Thread - 7299/WARN]:        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[14:38:05] [Craft Scheduler Thread - 7299/WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
[14:38:05] [Craft Scheduler Thread - 7299/WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
[14:38:05] [Craft Scheduler Thread - 7299/WARN]:        at java.base/java.lang.Thread.run(Thread.java:831)
[14:38:05] [Craft Scheduler Thread - 7299/WARN]: Caused by: java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "obj" is null
[14:38:05] [Craft Scheduler Thread - 7299/WARN]:        at SkinsRestorer.jar//net.skinsrestorer.shared.utils.ReflectionUtil.invokeMethod(ReflectionUtil.java:294)
[14:38:05] [Craft Scheduler Thread - 7299/WARN]:        ... 7 more

Would it be possible for this plugin to check for the presence of geyser/floodgate and if present account for the configured prefix OR have a setting in the config that would allow the server admin to specify if floodgate/geyser is present and specify the prefix so that this plugin may drop the prefix on lookup?

akemin-dayo commented 2 years ago

Geyser/Floodgate is actually officially supported by any plugin I write, because I use it on my own servers too! ;P (I think I've actually been using Geyser/Floodgate for far longer than BlueMapOfflineSkinSupport has even existed…)

In fact, unlinked, pure-Bedrock accounts were one of the things I explicitly tested for (albeit, my prefix is configured as the default * instead of your custom .).

That being said, this crash should be fixed with version 1.3.

Please reopen this issue if you are still experiencing issues.

(And sorry for the uh… several month late reply — things have been rather busy for me > <)