package me.ryanhamshire.GriefPrevention.events; import me.ryanhamshire.GriefPrevention.Claim; import org.bukkit.event.Event; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.Collection; import java.util.HashSet; /** * An {@link Event} involving multiple {@link Claim Claims}. */ public abstract class MultiClaimEvent extends Event { private final @NotNull Collection claims; public MultiClaimEvent(@Nullable Collection claims) { if (claims == null) { this.claims = new HashSet<>(); } else { this.claims = new HashSet<>(claims); } } /** * Get all affected claims. * * @return the affected claims */ public @NotNull Collection getClaims() { return claims; } }