package org.allaymc.api.eventbus.event.container;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.allaymc.api.annotation.CallerThread;
import org.allaymc.api.annotation.ThreadType;
import org.allaymc.api.container.Container;
import org.allaymc.api.container.ContainerViewer;
import org.allaymc.api.eventbus.event.CancellableEvent;

/**
 * Called when a viewer opens a container.
 *
 * @author daoge_cmd
 */
@AllArgsConstructor
@Getter
@CallerThread(ThreadType.WORLD)
public class ContainerOpenEvent extends ContainerEvent implements CancellableEvent {
    /**
     * The viewer opening the container.
     */
    protected ContainerViewer viewer;
    /**
     * The container being opened.
     */
    protected Container container;
}
