001/* 002 * PlotSquared, a land and world management plugin for Minecraft. 003 * Copyright (C) IntellectualSites <https://intellectualsites.com> 004 * Copyright (C) IntellectualSites team and contributors 005 * 006 * This program is free software: you can redistribute it and/or modify 007 * it under the terms of the GNU General Public License as published by 008 * the Free Software Foundation, either version 3 of the License, or 009 * (at your option) any later version. 010 * 011 * This program is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 014 * GNU General Public License for more details. 015 * 016 * You should have received a copy of the GNU General Public License 017 * along with this program. If not, see <https://www.gnu.org/licenses/>. 018 */ 019package com.plotsquared.core.events.post; 020 021import com.plotsquared.core.events.PlayerPlotAddRemoveEvent; 022import com.plotsquared.core.player.PlotPlayer; 023import com.plotsquared.core.plot.Plot; 024 025import java.util.UUID; 026 027/** 028 * Parent class for events covering players being added/removed to added/trusted/denied lists. 029 * 030 * @since 7.6.0 031 */ 032public sealed class PostPlayerPlotAddRemoveEvent extends PlayerPlotAddRemoveEvent permits PostPlayerPlotAddedEvent, 033 PostPlayerPlotDeniedEvent, PostPlayerPlotTrustedEvent { 034 035 private final boolean added; 036 037 protected PostPlayerPlotAddRemoveEvent( 038 final PlotPlayer<?> initiator, 039 final Plot plot, 040 final UUID player, 041 final Reason reason, 042 boolean added 043 ) { 044 super(initiator, plot, player, reason); 045 this.added = added; 046 } 047 048 /** 049 * Get if the player was added to a list, or removed. 050 */ 051 public boolean added() { 052 return added; 053 } 054 055 056}