Solved Get enderchest of an offline player

Discussion in 'Spigot Plugin Development' started by Vert3x, Apr 19, 2017.

Thread Status:
Not open for further replies.
  1. Hello, as I assumed that OfflinePlayer#getPlayer method is always going to return null if the player is offline, I was wondering if there's any way handled by spigot or bukkit to retrieve some stuff which would be accessible freely although player is offline such as the enderchest of those players even when they're offline. I'm saying "handled by spigot or bukkit" cause it would be pretty unsafe storing it manually and I was wondering if that was stored anywhere... Perhaps nms or craftbukkit version based classes? I don't know,, tell me what you know; thanks in advance for any help. :)
     
  2. What I would do is whenever the player modifies their enderchest inventory you save it to the config so whenever the player runs the command it accesses the saved inventory

    Sent from my SAMSUNG-SM-G935A using Tapatalk
     
  3. As getting the offline player's enderchest is not really mattering, I'm going not to do it if there is no actual method at all. Anyways we're still talking about OfflinePlayer's, so I would directly get their enderchest on their quit if I did store the necessary stuff, and I won't.
     
  4. I thinks you canno't do this but you can save ender chest in configuration file or db
     
  5. You have to store their enderchest on PlayerLeaveEvent why would u refuse that if it's the only solution.
     
  6. Cause that's not worth it to store all enderchests, neither in a file nor in an object. That is just a private Miscellaneous plugin I have, it doesn't matter that much! Thank you all, gonna close this!
     
Thread Status:
Not open for further replies.