PlotSquared/src/main/java/com/plotsquared/sponge/events/PlotUnlinkEvent.java

50 lines
1.1 KiB
Java
Raw Normal View History

2015-07-30 16:25:16 +02:00
package com.plotsquared.sponge.events;
import java.util.ArrayList;
import org.spongepowered.api.event.AbstractEvent;
import org.spongepowered.api.event.Cancellable;
import org.spongepowered.api.world.World;
import com.intellectualcrafters.plot.object.PlotId;
2015-09-13 06:04:31 +02:00
public class PlotUnlinkEvent extends AbstractEvent implements Cancellable {
2015-07-30 16:25:16 +02:00
private final ArrayList<PlotId> plots;
private final World world;
private boolean cancelled;
2015-09-13 06:04:31 +02:00
2015-07-30 16:25:16 +02:00
/**
* Called when a mega-plot is unlinked.
*
* @param world World in which the event occurred
* @param plots Plots that are involved in the event
*/
2015-09-13 06:04:31 +02:00
public PlotUnlinkEvent(final World world, final ArrayList<PlotId> plots) {
2015-07-30 16:25:16 +02:00
this.plots = plots;
this.world = world;
}
2015-09-13 06:04:31 +02:00
2015-07-30 16:25:16 +02:00
/**
* Get the plots involved
*
* @return PlotId
*/
2015-09-13 06:04:31 +02:00
public ArrayList<PlotId> getPlots() {
2015-09-11 12:09:22 +02:00
return plots;
2015-07-30 16:25:16 +02:00
}
2015-09-13 06:04:31 +02:00
public World getWorld() {
2015-09-11 12:09:22 +02:00
return world;
2015-07-30 16:25:16 +02:00
}
2015-09-13 06:04:31 +02:00
2015-07-30 16:25:16 +02:00
@Override
2015-09-13 06:04:31 +02:00
public boolean isCancelled() {
2015-09-11 12:09:22 +02:00
return cancelled;
2015-07-30 16:25:16 +02:00
}
2015-09-13 06:04:31 +02:00
2015-07-30 16:25:16 +02:00
@Override
2015-09-13 06:04:31 +02:00
public void setCancelled(final boolean cancel) {
2015-09-11 12:09:22 +02:00
cancelled = cancel;
2015-07-30 16:25:16 +02:00
}
2015-09-11 12:09:22 +02:00
}