gnembon / fabric-carpet

Fabric Carpet
MIT License
1.71k stars 273 forks source link

[Scarpet suggestion] Allow to access offline player's inventories #808

Open Firigion opened 3 years ago

Firigion commented 3 years ago

You currently can't access offline player's inventories nor enderchests, both of which would be useful for some moderation tools that could easily be written in scarpet. I don't see a real use outside this, though, so I'd understand if this gets ignored.

DragonEggBedrockBreaking commented 3 years ago

Try posting here instead: https://github.com/gnembon/scarpet/issues

No. This is the carpet mod repo, for asking for new features to be added to scarpet. The scarpet repo is for scarpet apps.

Firigion commented 3 years ago

Hm? A deleted comment?

DragonEggBedrockBreaking commented 3 years ago

Hm? A deleted comment?

Yes

Ghoulboy78 commented 3 years ago

It would require digging into player data file, and returning a blank inventory if not. Problem is that if the inventory is going to be writable, you could end up generating a bunch of player data files, which may cause quite some IO lag, so imo it should be read-onnly, but then again I am aware that that makes it far less useful...

Firigion commented 3 years ago

Still useful, tho. You at leas know where the stuff is, if you need to know. Issue is then, a read only-inventory would be a new thing, there's currently no ready-only invs I don't think.

altrisi commented 3 years ago

I guess if you don't need the access regularly you could just move the player's nbt file inside your app's data folder temporarily and parse their contents as NBT, but yeah, it would probably be nice to have a way to access them directly.