mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-04-17 00:46: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.2 KiB
Java
57 lines
1.2 KiB
Java
package com.plotsquared.bukkit.events;
|
|
|
|
import com.intellectualcrafters.plot.object.Plot;
|
|
import com.intellectualcrafters.plot.object.PlotId;
|
|
import org.bukkit.event.Cancellable;
|
|
import org.bukkit.event.HandlerList;
|
|
|
|
/**
|
|
* Called when a plot is cleared
|
|
*
|
|
*/
|
|
public class PlotClearEvent extends PlotEvent implements Cancellable {
|
|
|
|
private static final HandlerList handlers = new HandlerList();
|
|
private boolean cancelled;
|
|
public PlotClearEvent(Plot plot) {
|
|
super(plot);
|
|
}
|
|
|
|
public static HandlerList getHandlerList() {
|
|
return handlers;
|
|
}
|
|
|
|
/**
|
|
* Get the PlotId.
|
|
*
|
|
* @return PlotId
|
|
*/
|
|
public PlotId getPlotId() {
|
|
return getPlot().getId();
|
|
}
|
|
|
|
/**
|
|
* Get the world name.
|
|
*
|
|
* @return String
|
|
*/
|
|
public String getWorld() {
|
|
return getPlot().getArea().worldname;
|
|
}
|
|
|
|
@Override
|
|
public HandlerList getHandlers() {
|
|
return handlers;
|
|
}
|
|
|
|
@Override
|
|
public boolean isCancelled() {
|
|
return this.cancelled;
|
|
}
|
|
|
|
@Override
|
|
public void setCancelled(boolean b) {
|
|
this.cancelled = b;
|
|
}
|
|
}
|