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         * Note that if this chunk is new, it will not be populated at this time.
021         *
022         * @return true if the chunk is new, otherwise false
023         */
024        public boolean isNewChunk() {
025            return newChunk;
026        }
027    
028        @Override
029        public HandlerList getHandlers() {
030            return handlers;
031        }
032    
033        public static HandlerList getHandlerList() {
034            return handlers;
035        }
036    }