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; 020 021import com.plotsquared.core.player.PlotPlayer; 022import com.plotsquared.core.plot.Plot; 023 024import java.util.UUID; 025 026/** 027 * @deprecated Use {@link com.plotsquared.core.events.post.PostPlayerPlotDeniedEvent} 028 */ 029@Deprecated(forRemoval = true, since = "7.6.0") 030public class PlayerPlotDeniedEvent extends PlotEvent { 031 032 private final PlotPlayer<?> initiator; 033 private final boolean added; 034 private final UUID player; 035 036 /** 037 * PlayerPlotDeniedEvent: Called when the denied UUID list is modified for a plot. 038 * 039 * @param initiator Player that initiated the event 040 * @param plot Plot in which the event occurred 041 * @param player Player that was denied/un-denied 042 * @param added {@code true} of add to deny list, {@code false} if removed 043 * @deprecated Use {@link com.plotsquared.core.events.post.PostPlayerPlotDeniedEvent} 044 */ 045 @Deprecated(forRemoval = true, since = "7.6.0") 046 public PlayerPlotDeniedEvent(PlotPlayer<?> initiator, Plot plot, UUID player, boolean added) { 047 super(plot); 048 this.initiator = initiator; 049 this.added = added; 050 this.player = player; 051 } 052 053 /** 054 * If a user was added. 055 * 056 * @return boolean 057 * @deprecated Use {@link com.plotsquared.core.events.post.PostPlayerPlotDeniedEvent} 058 */ 059 @Deprecated(forRemoval = true, since = "7.6.0") 060 public boolean wasAdded() { 061 return this.added; 062 } 063 064 /** 065 * The player added/removed. 066 * 067 * @return UUID 068 * @deprecated Use {@link com.plotsquared.core.events.post.PostPlayerPlotDeniedEvent} 069 */ 070 @Deprecated(forRemoval = true, since = "7.6.0") 071 public UUID getPlayer() { 072 return this.player; 073 } 074 075 /** 076 * The player initiating the action. 077 * 078 * @return PlotPlayer 079 * @deprecated Use {@link com.plotsquared.core.events.post.PostPlayerPlotDeniedEvent} 080 */ 081 @Deprecated(forRemoval = true, since = "7.6.0") 082 public PlotPlayer<?> getInitiator() { 083 return this.initiator; 084 } 085 086}