Closed GershonR closed 7 years ago
Huh, that's interesting. I'll investigate, but I think that might be something that the Sponge guys don't intend to happen.
Line in question is here: https://github.com/NucleusPowered/Nucleus/blob/sponge-api/5/src/main/java/io/github/nucleuspowered/nucleus/modules/inventory/commands/InvSeeCommand.java#L77
can confirm this issue.
We have had issues with other player inventory plugins, could be a sponge inventory API issue?
It depends whether they think it's expected behaviour. I would say it isn't. I'm working on a workaround for now, but it might very well be that this is unintended behaviour from Sponge. If it is intended, it needs to be documented.
@Faithcaio @Aaron1011 - you two seem to have touched the Inventory API more than most recently - would you be able to clarify if this is a Sponge issue that will get resolved, or something we have to work with? Thanks!
Vanilla is doing this. InventoryPlayer
s isUsableByPlayer
function limits the distance to 8 blocks (and alive players).
We might need to handle PlayerInventory separatly.
Thanks, that's good to know.
I've updated the Nucleus Mixins project to try to offer a workaround for now - I alter the method isUsableByPlayer
as mentioned above to return true
if the player trying to access the inventory is not the owner of the inventory:
NucleusMixins-0.14.0-5.0-SNAPSHOT.zip
Install it like a mod. If you get problems with world pre-generation, look for a mixins.conf
file in config/nucleus
. Set world-generation
to false
- then restart the server.
This is somewhat untested. Use at your own risk.
If you do use it, let me know how it goes.
So far working perfect!!
Nucleus-0.13.1-S5-1.10.2 spongeforge-1.10.2-2107-6.0.0-BETA-1856
When using /invsee on a person from a distance the inventory screen will flash really quick then close, it only works when you're near a player.
/enderchest seems to work perfectly from distances though