Solved Get Chunk [WE API?]

Discussion in 'Plugin Development' started by Robin Bi, Mar 18, 2015.

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

    Robin Bi

    Hi there,

    I'm currently looking for a possibility to get the whole chunk a player stands in. I anticipated to be able to find a method in the WorldEdit API, but i didn't. Who knows, maybe I'm just blind though.

    So if someone knows how to do this, please let me know.



    Best regards,
    Robin Bi
     
  2. Offline

    TheEntropy

    @Robin Bi You can get the chunk that player is in by their location:

    Code:
    Location loc = player.getLocation();
    Chunk myChunk = loc.getChunk();
    
     
    Robin Bi likes this.
Thread Status:
Not open for further replies.

Share This Page