Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
ChunkLoadEvent.java
1 package org.bukkit.event.world;
2 
3 import org.bukkit.Chunk;
5 
6 /**
7  * Called when a chunk is loaded
8  */
9 public class ChunkLoadEvent extends ChunkEvent {
10  private static final HandlerList handlers = new HandlerList();
11  private final boolean newChunk;
12 
13  public ChunkLoadEvent(final Chunk chunk, final boolean newChunk) {
14  super(chunk);
15  this.newChunk = newChunk;
16  }
17 
18  /**
19  * Gets if this chunk was newly created or not.
20  * <p>
21  * Note that if this chunk is new, it will not be populated at this time.
22  *
23  * @return true if the chunk is new, otherwise false
24  */
25  public boolean isNewChunk() {
26  return newChunk;
27  }
28 
29  @Override
30  public HandlerList getHandlers() {
31  return handlers;
32  }
33 
34  public static HandlerList getHandlerList() {
35  return handlers;
36  }
37 }