LOOHP / ImageFrame

Put images on maps and walls!
https://www.spigotmc.org/resources/106031/
GNU General Public License v3.0
50 stars 14 forks source link

Refreshed images not saving and causing exception #56

Closed lewmilburn closed 6 months ago

lewmilburn commented 6 months ago

Refreshed images revert to their previous look upon server restart, and cause the below exception.

[14:00:52 INFO]: LewMilburn issued server command: /if refresh HP-UFS-4 [14:00:52 WARN]: java.lang.ClassCastException: class net.minecraft.server.level.ServerPlayer cannot be cast to class org.bukkit.entity.Player (net.minecraft.server.level.ServerPlayer and org.bukkit.entity.Player are in unnamed module of loader java.net.URLClassLoader @41cf53f9) [14:00:52 WARN]: at ImageFrame-1.7.8.2.jar//com.loohp.imageframe.nms.V1_20_6.lambda$getViewers$0(V1_20_6.java:109) [14:00:52 WARN]: at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) [14:00:52 WARN]: at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1715) [14:00:52 WARN]: at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) [14:00:52 WARN]: at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) [14:00:52 WARN]: at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) [14:00:52 WARN]: at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [14:00:52 WARN]: at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) [14:00:52 WARN]: at ImageFrame-1.7.8.2.jar//com.loohp.imageframe.nms.V1_20_6.getViewers(V1_20_6.java:109) [14:00:52 WARN]: at ImageFrame-1.7.8.2.jar//com.loohp.imageframe.utils.MapUtils.getViewers(MapUtils.java:196) [14:00:52 WARN]: at ImageFrame-1.7.8.2.jar//com.loohp.imageframe.objectholders.ImageMap.getViewers(ImageMap.java:356) [14:00:52 WARN]: at ImageFrame-1.7.8.2.jar//com.loohp.imageframe.objectholders.URLStaticImageMap.update(URLStaticImageMap.java:221) [14:00:52 WARN]: at ImageFrame-1.7.8.2.jar//com.loohp.imageframe.objectholders.ImageMap.update(ImageMap.java:211) [14:00:52 WARN]: at ImageFrame-1.7.8.2.jar//com.loohp.imageframe.Commands.lambda$onCommand$19(Commands.java:724) [14:00:52 WARN]: at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:101) [14:00:52 WARN]: at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) [14:00:52 WARN]: at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) [14:00:52 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) [14:00:52 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) [14:00:52 WARN]: at java.base/java.lang.Thread.run(Thread.java:1583)

LOOHP commented 6 months ago

Can you give build #104 a try and see whether this is fixed?

lewmilburn commented 6 months ago

That's fixed it, thanks!