42 lines
965 B
Java
Raw Normal View History

2015-07-31 00:25:16 +10:00
package com.plotsquared.sponge.events;
import org.spongepowered.api.event.Cancellable;
import com.intellectualcrafters.plot.flag.Flag;
import com.intellectualcrafters.plot.object.Plot;
2015-09-13 14:04:31 +10:00
public class PlotFlagRemoveEvent extends PlotEvent implements Cancellable {
2015-07-31 00:25:16 +10:00
private final Flag flag;
private boolean cancelled;
2015-09-13 14:04:31 +10:00
2015-07-31 00:25:16 +10:00
/**
* PlotFlagRemoveEvent: Called when a flag is removed from a plot
*
* @param flag Flag that was removed
* @param plot Plot from which the flag was removed
*/
2015-09-13 14:04:31 +10:00
public PlotFlagRemoveEvent(final Flag flag, final Plot plot) {
2015-07-31 00:25:16 +10:00
super(plot);
this.flag = flag;
}
2015-09-13 14:04:31 +10:00
2015-07-31 00:25:16 +10:00
/**
* Get the flag involved
*
* @return Flag
*/
2015-09-13 14:04:31 +10:00
public Flag getFlag() {
2015-09-11 20:09:22 +10:00
return flag;
2015-07-31 00:25:16 +10:00
}
2015-09-13 14:04:31 +10:00
2015-07-31 00:25:16 +10:00
@Override
2015-09-13 14:04:31 +10:00
public boolean isCancelled() {
2015-09-11 20:09:22 +10:00
return cancelled;
2015-07-31 00:25:16 +10:00
}
2015-09-13 14:04:31 +10:00
2015-07-31 00:25:16 +10:00
@Override
2015-09-13 14:04:31 +10:00
public void setCancelled(final boolean cancel) {
2015-09-11 20:09:22 +10:00
cancelled = cancel;
2015-07-31 00:25:16 +10:00
}
2015-09-11 20:09:22 +10:00
}