EnderContainers

EnderContainers

2.5k Downloads

Cannot initialize the NMS player utility class

andris155 opened this issue ยท 3 comments

commented

Versions

EnderContainers version: 2.2.1-dev
Platform version: Paper 1.16.3

Describe the bug

/ecp open name write error sometimes

To Reproduce

Use /ecp open name command.

Expected behavior

No write this error.

Screenshots

Additional context

[18:27:14] [Server thread/INFO]: MrZeri issued server command: /ecp open skrisz01
[18:27:14] [Craft Scheduler Thread - 2679/ERROR]: [EnderContainers] Cannot initialize the NMS player utility class
java.lang.NoSuchMethodException: net.minecraft.server.v1_16_R2.MinecraftServer.getWorldServer(net.minecraft.server.v1_16_R2.DimensionManager)
	at java.lang.Class.getMethod(Unknown Source) ~[?:?]
	at fr.utarwyn.endercontainers.compatibility.nms.NMSPlayerUtil.<clinit>(NMSPlayerUtil.java:54) ~[?:?]
	at fr.utarwyn.endercontainers.enderchest.VanillaEnderChest.reloadOwnerProfile(VanillaEnderChest.java:109) ~[?:?]
	at fr.utarwyn.endercontainers.enderchest.VanillaEnderChest.<init>(VanillaEnderChest.java:36) ~[?:?]
	at fr.utarwyn.endercontainers.enderchest.context.PlayerContext.createEnderchest(PlayerContext.java:190) ~[?:?]
	at java.util.stream.IntPipeline$1$1.accept(Unknown Source) ~[?:?]
	at java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Unknown Source) ~[?:?]
	at java.util.Spliterator$OfInt.forEachRemaining(Unknown Source) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[?:?]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[?:?]
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) ~[?:?]
	at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[?:?]
	at java.util.stream.ReferencePipeline.collect(Unknown Source) ~[?:?]
	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_16_R2.scheduler.CraftTask.run(CraftTask.java:99) ~[patched_1.16.3.jar:git-Paper-240]
	at org.bukkit.craftbukkit.v1_16_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[patched_1.16.3.jar:git-Paper-240]
	at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.16.3.jar:git-Paper-240]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
	at java.lang.Thread.run(Unknown Source) [?:?]
[18:27:14] [Craft Scheduler Thread - 2679/ERROR]: [EnderContainers] Cannot get the profile of player 07cbc1ec-3856-307a-8d9b-549eeaa7bca0
java.lang.reflect.InvocationTargetException: null
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:?]
	at fr.utarwyn.endercontainers.compatibility.nms.NMSPlayerUtil.loadPlayer(NMSPlayerUtil.java:91) ~[?:?]
	at fr.utarwyn.endercontainers.enderchest.VanillaEnderChest.reloadOwnerProfile(VanillaEnderChest.java:109) ~[?:?]
	at fr.utarwyn.endercontainers.enderchest.VanillaEnderChest.<init>(VanillaEnderChest.java:36) ~[?:?]
	at fr.utarwyn.endercontainers.enderchest.context.PlayerContext.createEnderchest(PlayerContext.java:190) ~[?:?]
	at java.util.stream.IntPipeline$1$1.accept(Unknown Source) ~[?:?]
	at java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Unknown Source) ~[?:?]
	at java.util.Spliterator$OfInt.forEachRemaining(Unknown Source) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[?:?]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[?:?]
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) ~[?:?]
	at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[?:?]
	at java.util.stream.ReferencePipeline.collect(Unknown Source) ~[?:?]
	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_16_R2.scheduler.CraftTask.run(CraftTask.java:99) ~[patched_1.16.3.jar:git-Paper-240]
	at org.bukkit.craftbukkit.v1_16_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[patched_1.16.3.jar:git-Paper-240]
	at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.16.3.jar:git-Paper-240]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
	at java.lang.Thread.run(Unknown Source) [?:?]
Caused by: java.lang.NullPointerException
	at net.minecraft.server.v1_16_R2.EntityPlayer.<init>(EntityPlayer.java:130) ~[patched_1.16.3.jar:git-Paper-240]
	... 24 more
commented

Oh, methods have changed in 1.16 to retrieve a world through NMS. I will fix that, sorry for the inconvenience!

commented
commented

Thanks!