Plugin error on 1.17
andris155 opened this issue ยท 3 comments
Versions
EnderContainers version: 2.3.0-dev
Platform version: Paper 1.17
Describe the bug
Plugin error on 1.17
To Reproduce
Run plugin on 1.17
Expected behavior
No plugin error on 1.17
Screenshots
Additional context
[20:06:36 WARN]: [EnderContainers] Plugin EnderContainers v2.3.0-dev generated an exception while executing task 568463
java.lang.NullPointerException: Cannot invoke "fr.utarwyn.endercontainers.compatibility.ServerVersion.ordinal()" because the return value of "fr.utarwyn.endercontainers.compatibility.ServerVersion.get()" is null
at fr.utarwyn.endercontainers.compatibility.ServerVersion.isOlderThan(ServerVersion.java:53) ~[?:?]
at fr.utarwyn.endercontainers.configuration.Locale.formatMessage(Locale.java:70) ~[?:?]
at fr.utarwyn.endercontainers.configuration.Locale.lambda$getMessage$0(Locale.java:58) ~[?:?]
at java.util.HashMap.computeIfAbsent(HashMap.java:1224) ~[?:?]
at fr.utarwyn.endercontainers.configuration.Locale.getMessage(Locale.java:57) ~[?:?]
at fr.utarwyn.endercontainers.inventory.EnderChestInventory.getTitle(EnderChestInventory.java:109) ~[?:?]
at fr.utarwyn.endercontainers.inventory.AbstractInventoryHolder.reloadInventory(AbstractInventoryHolder.java:116) ~[?:?]
at fr.utarwyn.endercontainers.inventory.EnderChestInventory.<init>(EnderChestInventory.java:45) ~[?:?]
at fr.utarwyn.endercontainers.enderchest.EnderChest.<init>(EnderChest.java:49) ~[?:?]
at fr.utarwyn.endercontainers.enderchest.VanillaEnderChest.<init>(VanillaEnderChest.java:35) ~[?:?]
at fr.utarwyn.endercontainers.enderchest.context.PlayerContext.createEnderchest(PlayerContext.java:194) ~[?:?]
at java.util.stream.IntPipeline$1$1.accept(IntPipeline.java:180) ~[?:?]
at java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Streams.java:104) ~[?:?]
at java.util.Spliterator$OfInt.forEachRemaining(Spliterator.java:699) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) ~[?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
at fr.utarwyn.endercontainers.enderchest.context.PlayerContext.loadEnderchests(PlayerContext.java:122) ~[?:?]
at fr.utarwyn.endercontainers.enderchest.context.LoadTask.run(LoadTask.java:63) ~[?:?]
at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:100) ~[patched_1.17.jar:git-Paper-"33d6b6f"]
at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[patched_1.17.jar:git-Paper-"33d6b6f"]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.17.jar:git-Paper-"33d6b6f"]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[?:?]
at java.lang.Thread.run(Thread.java:831) [?:?]
I have added 1.17 support with new methods to handle NMS objects for holograms. I hope it will also works for offline players (if no, paste me here the stack trace of the error and I will fix it).