lishid / OpenInv

Open anyone's inventory as a chest, real-time!
GNU General Public License v3.0
119 stars 94 forks source link

Expand offline manipulation; include fancy GUI #54

Closed Jikoo closed 4 years ago

Jikoo commented 7 years ago

After having to figure out offline teleportation and gamemode/potion modification back in 1.9 I've been toying on and off with adding it to OpenInv.

If it is, there's a lot of room for expansion: Display-only: ID (UUID for supported versions, name for older), IP if online, seen date Editable: gamemode, location, health and hunger, potion effects, and experience

This issue is pretty much the same as #5 - is it within the scope of OpenInv to add additional offline player manipulation? I could just as easily make it an addon plugin instead, there's no need to add the features directly to OpenInv. Bloat is not a concern - support for 19(!) versions is more bloat than another command and a little inventory monitoring code piggybacking on our existing listeners could possibly cause. OpenInv 3.0.3 for 1.4.5-1.11 is 248KB while 1.11 alone is 27KB. A conditional to check if a feature is enabled is nanoseconds in the wind. Would this be useful, or is it just feature creep?

At the very least, it makes sense to add a wrapper for the CraftPlayer we load that properly supports all operations; we now officially have a public API for retrieving a Player object from an OfflinePlayer.

BlackBeltPanda commented 7 years ago

I'd personally love to see those features added. =)

Jikoo commented 4 years ago

I've introduced a basic system for fixing issues with offline CraftPlayers in a1b2df74cc56e93f3f35e09b22f1530c67794740. I believe other functions are outside of the scope of OpenInv, and should be done by an addon using OpenInv to load players. As far as reimplementing methods to ensure that they're safe to use offline, I am willing to do so as the need arises but I'm not going to create a bunch of work for myself if no one's using it.