How to add something to the inventory, the player offline?

Discussion in 'Plugin Development' started by Q.from.the.continuum, Feb 16, 2012.

Thread Status:
Not open for further replies.
  1. I have the name of the player he wants to add something to the inventory. Unfortunately, sometimes it is offline. Is it possible to add something to the inventory when the player is online and offline?
     
  2. Offline

    mushroomhostage

    Yes its possible, you can use the net.minecraft.server methods to load the EntityPlayer by name, as if they were online, then you can manipulate their inventory. Another option is loading the player .dat yourself and manipulating the NBT tags manually. Both approaches have advantages/disadvantages.
     
  3. Offline

    Waffletastic

    Just add it when they login.
     
Thread Status:
Not open for further replies.

Share This Page