2015-07-30 16:25:16 +02:00
|
|
|
package com.plotsquared.sponge.events;
|
|
|
|
|
|
|
|
import java.util.UUID;
|
|
|
|
|
2015-09-06 03:53:56 +02:00
|
|
|
import org.spongepowered.api.entity.player.Player;
|
2015-07-30 16:25:16 +02:00
|
|
|
|
|
|
|
import com.intellectualcrafters.plot.object.Plot;
|
|
|
|
|
|
|
|
public class PlayerPlotDeniedEvent extends PlotEvent {
|
|
|
|
|
|
|
|
private final Player initiator;
|
|
|
|
private final boolean added;
|
|
|
|
private final UUID player;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* PlayerPlotDeniedEvent: Called when the denied UUID list is modified for a plot
|
|
|
|
*
|
|
|
|
* @param initiator Player that initiated the event
|
|
|
|
* @param plot Plot in which the event occurred
|
|
|
|
* @param player Player that was denied/un-denied
|
|
|
|
* @param added true of add to deny list, false if removed
|
|
|
|
*/
|
|
|
|
public PlayerPlotDeniedEvent(final Player initiator, final Plot plot, final UUID player, final boolean added) {
|
|
|
|
super(plot);
|
|
|
|
this.initiator = initiator;
|
|
|
|
this.added = added;
|
|
|
|
this.player = player;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* If a user was added
|
|
|
|
*
|
|
|
|
* @return boolean
|
|
|
|
*/
|
|
|
|
public boolean wasAdded() {
|
|
|
|
return this.added;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The player added/removed
|
|
|
|
*
|
|
|
|
* @return UUID
|
|
|
|
*/
|
|
|
|
public UUID getPlayer() {
|
|
|
|
return this.player;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The player initiating the action
|
|
|
|
*
|
|
|
|
* @return Player
|
|
|
|
*/
|
|
|
|
public Player getInitiator() {
|
|
|
|
return this.initiator;
|
|
|
|
}
|
|
|
|
}
|