Saving Holograms locations/Getting locs in a chunk

Discussion in 'Plugin Development' started by MCCoding, Apr 26, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    MCCoding

    I'm wanting to save my Holograms locations so they don't despawn once a player leaves the server or when they was out of range from it. I'm a little confused on how to do this as it's all with packets etc, from what i know i will have to send the packet to the horse (i think?). Which i was thinking of making it so when i create a Hologram i add he location and the text into the hashmap then use a chunk load event and if there is a location saved in that chunk display the hologram but how do i get all the locations in a chunk?

    Also if there is a better way do to this please let me know, and if there is a reflection version of the Holograms also let me know, thanks!
     
  2. MCCoding Save the string of the hologram and the location as hashmap in config I think (?) and load it when chunk load?
     
  3. Offline

    MCCoding

    Someone_Like_You
    Yeah, how would check if the location is in the loaded chunk?
     
  4. MCCoding hmm, thats intresting, no idea haha, but you (maybe?) can get the hologram chunk location (h.getLocation().getChunk()) and try do something with it?
     
  5. Offline

    MCCoding

    Someone_Like_You
    Wouldn't that just return the chunk? not the location in the chunk.
     
  6. MCCoding hmm, how about saving the hologram location in hashmap, and on chunk load event get the player, check if his distance from the hologram > 100~ and display the hologram?
     
Thread Status:
Not open for further replies.

Share This Page