Jannyboy11 / InvSee-plus-plus

A bukkit plugin for manipulating player inventories
Other
91 stars 18 forks source link

a problem with the plugin :( #38

Closed havikun closed 1 year ago

havikun commented 1 year ago

For some reason, the plugin doesn't let me open inventories of either online people or offline people. When I do it with someone who is online with the /invsee command, nothing appears in the chat and it doesn't open

https://youtu.be/bmVtbhqfLp4

[12:57:23] [Server thread/ERROR] [co.ja.in.sp.InvseePlusPlus/]: [InvSee++] Error while trying to create main-inventory spectator inventory java.util.concurrent.CompletionException: java.lang.NoSuchMethodError: 'java.io.File net.minecraft.world.level.storage.PlayerDataStorage.getPlayerDir()' at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?] {re:mixin,re:mixin} at java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1194) ~[?:?] {re:mixin,re:mixin} at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2309) ~[?:?] {re:mixin,re:mixin} at com.janboerman.invsee.spigot.internal.NamesAndUUIDs.resolveUUID(NamesAndUUIDs.java:182) ~[?:?] {} at com.janboerman.invsee.spigot.internal.NamesAndUUIDs.lambda$resolveUUID$6(NamesAndUUIDs.java:184) ~[?:?] {} at java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1187) ~[?:?] {re:mixin,re:mixin} at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2309) ~[?:?] {re:mixin,re:mixin} at com.janboerman.invsee.spigot.internal.NamesAndUUIDs.resolveUUID(NamesAndUUIDs.java:182) ~[?:?] {} at com.janboerman.invsee.spigot.internal.NamesAndUUIDs.lambda$resolveUUID$6(NamesAndUUIDs.java:184) ~[?:?] {} at java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1187) ~[?:?] {re:mixin,re:mixin} at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2309) ~[?:?] {re:mixin,re:mixin} at com.janboerman.invsee.spigot.internal.NamesAndUUIDs.resolveUUID(NamesAndUUIDs.java:182) ~[?:?] {} at com.janboerman.invsee.spigot.internal.NamesAndUUIDs.resolveUUID(NamesAndUUIDs.java:165) ~[?:?] {} at com.janboerman.invsee.spigot.api.InvseeAPI.fetchUniqueId(InvseeAPI.java:240) ~[?:?] {} at com.janboerman.invsee.spigot.api.InvseeAPI.mainSpectatorInventory(InvseeAPI.java:372) ~[?:?] {} at com.janboerman.invsee.spigot.api.InvseeAPI.spectateInventory(InvseeAPI.java:330) ~[?:?] {} at com.janboerman.invsee.spigot.InvseeCommandExecutor.onCommand(InvseeCommandExecutor.java:149) ~[?:?] {} at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[forge-1.18.2-40.2.0-universal.jar%23125!/:?] {re:mixin,re:mixin,re:classloading} at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155) ~[forge-1.18.2-40.2.0-universal.jar%23125!/:?] {re:classloading} at org.bukkit.craftbukkit.v1_18_R2.CraftServer.dispatchCommand(CraftServer.java:776) ~[forge-1.18.2-40.2.0-universal.jar%23125!/:7e29f765-296df566-9fb885e8] {re:classloading} at net.minecraft.server.network.ServerGamePacketListenerImpl.m9957(ServerGamePacketListenerImpl.java:1647) ~[server-1.18.2-20220404.173914-srg.jar%23120!/:?] {re:mixin,re:classloading,pl:mixin:A} at net.minecraft.server.network.ServerGamePacketListenerImpl.m143628(ServerGamePacketListenerImpl.java:1578) ~[server-1.18.2-20220404.173914-srg.jar%23120!/:?] {re:mixin,re:classloading,pl:mixin:A} at net.minecraft.server.network.ServerGamePacketListenerImpl.m7388(ServerGamePacketListenerImpl.java:1560) ~[server-1.18.2-20220404.173914-srg.jar%23120!/:?] {re:mixin,re:classloading,pl:mixin:A} at net.minecraft.network.protocol.game.ServerboundChatPacket.m5797(ServerboundChatPacket.java:35) ~[server-1.18.2-20220404.173914-srg.jar%23120!/:?] {re:classloading} at net.minecraft.network.protocol.game.ServerboundChatPacket.m5797(ServerboundChatPacket.java:6) ~[server-1.18.2-20220404.173914-srg.jar%23120!/:?] {re:classloading} at net.minecraft.network.protocol.PacketUtils.m131356(PacketUtils.java:26) ~[server-1.18.2-20220404.173914-srg.jar%23120!/:?] {re:classloading} at net.minecraft.server.TickTask.run(TickTask.java:18) ~[server-1.18.2-20220404.173914-srg.jar%23120!/:?] {re:classloading,re:mixin} at net.minecraft.util.thread.BlockableEventLoop.m6367(BlockableEventLoop.java:157) ~[server-1.18.2-20220404.173914-srg.jar%23120!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B} at net.minecraft.util.thread.ReentrantBlockableEventLoop.m6367(ReentrantBlockableEventLoop.java:23) ~[server-1.18.2-20220404.173914-srg.jar%23120!/:?] {re:mixin,re:computing_frames,re:classloading} at net.minecraft.server.MinecraftServer.m6367(MinecraftServer.java:1022) ~[server-1.18.2-20220404.173914-srg.jar%23120!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:A} at net.minecraft.server.MinecraftServer.m6367(MinecraftServer.java:133) ~[server-1.18.2-20220404.173914-srg.jar%23120!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:A} at net.minecraft.util.thread.BlockableEventLoop.m7245(BlockableEventLoop.java:131) ~[server-1.18.2-20220404.173914-srg.jar%23120!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B} at net.minecraft.server.MinecraftServer.m129961(MinecraftServer.java:1005) ~[server-1.18.2-20220404.173914-srg.jar%23120!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:A} at net.minecraft.server.MinecraftServer.m7245(MinecraftServer.java:999) ~[server-1.18.2-20220404.173914-srg.jar%23120!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:A} at net.minecraft.util.thread.BlockableEventLoop.m18701(BlockableEventLoop.java:140) ~[server-1.18.2-20220404.173914-srg.jar%23120!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B} at net.minecraft.server.MinecraftServer.m130012(MinecraftServer.java:985) ~[server-1.18.2-20220404.173914-srg.jar%23120!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:A} at net.minecraft.server.MinecraftServer.m130011(MinecraftServer.java:884) ~[server-1.18.2-20220404.173914-srg.jar%23120!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:A} at net.minecraft.server.MinecraftServer.m177918(MinecraftServer.java:257) ~[server-1.18.2-20220404.173914-srg.jar%23120!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:A} at java.lang.Thread.run(Thread.java:833) [?:?] {re:mixin} Caused by: java.lang.NoSuchMethodError: 'java.io.File net.minecraft.world.level.storage.PlayerDataStorage.getPlayerDir()' at com.janboerman.invsee.spigot.impl_1_18_2_R2.UUIDSearchSaveFilesStrategy.resolveUniqueId(UUIDSearchSaveFilesStrategy.java:46) ~[?:?] {} at com.janboerman.invsee.spigot.internal.NamesAndUUIDs.resolveUUID(NamesAndUUIDs.java:182) ~[?:?] {} at com.janboerman.invsee.spigot.internal.NamesAndUUIDs.lambda$resolveUUID$6(NamesAndUUIDs.java:184) ~[?:?] {} at java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1187) ~[?:?] {re:mixin,re:mixin} ... 37 more

Jannyboy11 commented 1 year ago

You're running hybrid server software that supports both plugins and mods, but does not have all of CraftBukkit patches. I need to know which server software it is before I can help you any further.

Jannyboy11 commented 1 year ago

I have implemented a fallback workaround that should work on most modded servers as of release 0.18.1. Please download it from the release page and let me know if it works. If it does, you can close this issue. If this does not work, then I must still know which server software you are using.

havikun commented 1 year ago

the server software is the magma foundation, now I will download the 0.18.1 plugin to see if it works

havikun commented 1 year ago

It still doesn't work having downloaded the 0.18.1 release, and now it doesn't even leave me a message that there was an error trying to open the inventory

Jannyboy11 commented 1 year ago

Alright, thanks for telling me!

I had the following conversation on the Magma discord: image

The issue should be fixed as of Release v0.18.2, otherwise, it will be fixed by a future version of Magma.

Release v0.18.2 will also show a big error again if the player data folder could not be found. CI will finish in about 20 minutes after which you can download the jar files.

Jannyboy11 commented 1 year ago

otherwise, it will be fixed by a future version of Magma.

Magma added this functionality as of https://git.magmafoundation.org/magmafoundation/Magma-1-18-x/-/commit/f7c89f3a388a1d7ff076fb5b5ff63bb89e6f8e33, which is included in the next release of Magma, which is currently underway!

havikun commented 1 year ago

oh, thank you very much!, I'll try now with version 0.18.2, if it doesn't work, I'll wait for the next versions of magma, now I'll try and see how it goes

Jannyboy11 commented 1 year ago

Hmmm. For me it works in online mode, but not in offline mode (which I think is what you're using as well). I will have to do some more investigation. At least getting the player files now works correctly, but now there is a different bug. I'm not quite sure how Magma is different from CraftBukkit here, so sorry, I need more time to help you out.

Jannyboy11 commented 1 year ago

Re-added the bug-in-other-software label since the 'getting the player files'-bug is now fixed, but there is a different bug now (that is not present in CraftBukkit). I'm not sure yet what it is. Either it's related to threading, or there's an issue of packets not being sent correctly to the client.

Jannyboy11 commented 1 year ago

Either it's related to threading, or there's an issue of packets not being sent correctly to the client.

Confirmed that it is a threading issue. On Magma the plugin never completes the task of retrieving the target's uuid and then opening the inventory. It even fails when the target player is online.

havikun commented 1 year ago

mmmm I understand, thank you so much for the help, so, I need to wait for the new version of magma? I could test if it goes in online mode ^^

Jannyboy11 commented 1 year ago

I tested in both online and offline mode. It doesn't work in either mode (I think I forgot to use the latest version of the plugin in that previous test). I already used the latest version of Magma in this test, so I think it's a bug in Magma's task scheduler. I will have to do some more digging later this week to find the exact issue though, sorry.

I asked on the Magma discord whether this is a known issue: https://discord.com/channels/612695539729039411/950182941542211594/1069728715157819482 but I think I will have to find out myself which part of the task chain never succeeds, hence I need more time.

havikun commented 1 year ago

Don't worry, I'll be attentive to anything, thank you very much for the help and kindness :D

Jannyboy11 commented 1 year ago

Okay, I did some more investigation and here is what I found: The technique that InvSee++ uses to open an inventory with a custom title and mirror per spectator works on CraftBukkit, but does not work on Magma. I am not sure whether this is technically a bug in Magma (since using internals actually isn't stable api), so I will find a fix for this for Magma.

I did test InvSee++_Give and InvSee++_Clear as well on Magma, and those work fine, since they do not use the per-player-customised-window approach.

Jannyboy11 commented 1 year ago

Fixed as of Release 0.18.3. I had no issues anymore on Magma using this build. Could you close the issue when it works for you as well?

havikun commented 1 year ago

hello, I'm going to see if it works with version 0.18.3, I'll let you know in a few minutes :D

havikun commented 1 year ago

image

hey, now the plugin works perfectly for me, thank you very much for your patience hahaha, now I'm going to close the issue :D

YassevZriona commented 1 year ago

JannyBoy, im just commenting - you are such a nice guy I was just checking out this issue since Im on hybrid too but wow usually plugin developers hate hybrid users You are really friendly and I like that :D

You are a nice guy and I hope you will experience nice things in your life... @Jannyboy11

Jannyboy11 commented 1 year ago

JannyBoy, im just commenting - you are such a nice guy

Thank you!

I was just checking out this issue since Im on hybrid too but wow usually plugin developers hate hybrid users You are really friendly and I like that :D

Yes I understand why other plugin developers do not support hybrid servers: For large plugins hybrid server support costs a lot of effort, and the gain is very small for them, because hybrid servers are only a really small percentage of users. InvSee++ is rather small, so for me it wasn't too much effort.

You are a nice guy and I hope you will experience nice things in your life... @Jannyboy11

Thanks! I recently got my masters degree in computer science, so good things are definitely happining!

By the way, for the full server software support list, please refer to: https://github.com/Jannyboy11/InvSee-plus-plus#supported-server-software

havikun commented 1 year ago

I say the same, you treated me very kindly and that does not happen with all plugin developers, thanks for helping me with my problem ^^