package net.thenextlvl.worlds.event;

import org.bukkit.World;
import org.bukkit.event.HandlerList;
import org.bukkit.event.world.WorldEvent;
import org.jetbrains.annotations.ApiStatus;

/**
 * Represents an event triggered when a {@link World} is backed up.
 * This event allows developers to modify the world before it is written to disk.
 *
 * @since 4.0.0
 */
public final class WorldBackupEvent extends WorldEvent {
    private static final HandlerList handlerList = new HandlerList();

    @ApiStatus.Internal
    public WorldBackupEvent(final World world) {
        super(world, false);
    }

    @Override
    public HandlerList getHandlers() {
        return handlerList;
    }

    public static HandlerList getHandlerList() {
        return handlerList;
    }
}
