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

56 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-11 12:09:22 +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;
/**
* 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-11 12:09:22 +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;
}
/**
* Get the plots involved
*
* @return PlotId
*/
2015-09-11 12:09:22 +02:00
public ArrayList<PlotId> getPlots()
{
return plots;
2015-07-30 16:25:16 +02:00
}
2015-09-11 12:09:22 +02:00
public World getWorld()
{
return world;
2015-07-30 16:25:16 +02:00
}
@Override
2015-09-11 12:09:22 +02:00
public boolean isCancelled()
{
return cancelled;
2015-07-30 16:25:16 +02:00
}
@Override
2015-09-11 12:09:22 +02:00
public void setCancelled(final boolean cancel)
{
cancelled = cancel;
2015-07-30 16:25:16 +02:00
}
2015-09-11 12:09:22 +02:00
}