mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-04-07 20:16:23 +02:00

- No license is the same as all rights reserved - There's already a license at the root of the project - The message was not in most files. easier to remove it - Support link isn't valid - No longer just the bukkit API
57 lines
1.3 KiB
Java
57 lines
1.3 KiB
Java
package com.plotsquared.bukkit.events;
|
|
|
|
import com.intellectualcrafters.plot.flag.Flag;
|
|
import com.intellectualcrafters.plot.object.Plot;
|
|
import org.bukkit.event.Cancellable;
|
|
import org.bukkit.event.HandlerList;
|
|
|
|
/**
|
|
* Called when a Flag is added to a plot.
|
|
*
|
|
*/
|
|
public class PlotFlagAddEvent extends PlotEvent implements Cancellable {
|
|
|
|
private static final HandlerList handlers = new HandlerList();
|
|
private final Flag flag;
|
|
private boolean cancelled;
|
|
|
|
/**
|
|
* PlotFlagAddEvent: Called when a Flag is added to a plot.
|
|
*
|
|
* @param flag Flag that was added
|
|
* @param plot Plot to which the flag was added
|
|
*/
|
|
public PlotFlagAddEvent(Flag flag, Plot plot) {
|
|
super(plot);
|
|
this.flag = flag;
|
|
}
|
|
|
|
public static HandlerList getHandlerList() {
|
|
return handlers;
|
|
}
|
|
|
|
/**
|
|
* Get the flag involved.
|
|
*
|
|
* @return Flag
|
|
*/
|
|
public Flag getFlag() {
|
|
return this.flag;
|
|
}
|
|
|
|
@Override
|
|
public HandlerList getHandlers() {
|
|
return handlers;
|
|
}
|
|
|
|
@Override
|
|
public final boolean isCancelled() {
|
|
return this.cancelled;
|
|
}
|
|
|
|
@Override
|
|
public final void setCancelled(boolean cancelled) {
|
|
this.cancelled = cancelled;
|
|
}
|
|
}
|