001    package org.bukkit.event.world;
002    
003    import org.bukkit.Chunk;
004    import org.bukkit.event.HandlerList;
005    
006    /**
007     * Called when a chunk is loaded
008     */
009    public class ChunkLoadEvent extends ChunkEvent {
010        private static final HandlerList handlers = new HandlerList();
011        private final boolean newChunk;
012    
013        public ChunkLoadEvent(final Chunk chunk, final boolean newChunk) {
014            super(chunk);
015            this.newChunk = newChunk;
016        }
017    
018        /**
019         * Gets if this chunk was newly created or not.
020         * <p>
021         * Note that if this chunk is new, it will not be populated at this time.
022         *
023         * @return true if the chunk is new, otherwise false
024         */
025        public boolean isNewChunk() {
026            return newChunk;
027        }
028    
029        @Override
030        public HandlerList getHandlers() {
031            return handlers;
032        }
033    
034        public static HandlerList getHandlerList() {
035            return handlers;
036        }
037    }