2014-09-23 04:08:31 +02:00
|
|
|
/*
|
2014-10-12 09:37:36 +02:00
|
|
|
* Copyright (c) IntellectualCrafters - 2014. You are not allowed to distribute
|
|
|
|
* and/or monetize any of our intellectual property. IntellectualCrafters is not
|
|
|
|
* affiliated with Mojang AB. Minecraft is a trademark of Mojang AB.
|
|
|
|
*
|
|
|
|
* >> File = PlotDeleteEvent.java >> Generated by: Citymonstret at 2014-08-09
|
|
|
|
* 15:21
|
2014-09-23 04:08:31 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
package com.intellectualcrafters.plot.events;
|
|
|
|
|
|
|
|
import org.bukkit.event.Cancellable;
|
|
|
|
import org.bukkit.event.Event;
|
|
|
|
import org.bukkit.event.HandlerList;
|
2014-09-24 14:21:43 +02:00
|
|
|
|
|
|
|
import com.intellectualcrafters.plot.PlotId;
|
2014-09-23 04:08:31 +02:00
|
|
|
|
|
|
|
/**
|
2014-09-25 08:39:13 +02:00
|
|
|
* Called when a plot is deleted
|
2014-09-23 04:08:31 +02:00
|
|
|
*/
|
2014-09-24 14:21:43 +02:00
|
|
|
public class PlotDeleteEvent extends Event implements Cancellable {
|
2014-10-11 09:33:10 +02:00
|
|
|
private static HandlerList handlers = new HandlerList();
|
|
|
|
private boolean cancelled;
|
2014-09-23 04:08:31 +02:00
|
|
|
|
2014-10-11 09:33:10 +02:00
|
|
|
private PlotId id;
|
|
|
|
private String world;
|
2014-10-03 04:36:30 +02:00
|
|
|
|
2014-10-11 09:33:10 +02:00
|
|
|
/**
|
|
|
|
* PlotDeleteEvent: Called when a plot is deleted
|
|
|
|
*
|
|
|
|
* @param world
|
|
|
|
* @param id
|
|
|
|
*/
|
|
|
|
public PlotDeleteEvent(String world, PlotId id) {
|
|
|
|
this.id = id;
|
|
|
|
this.world = world;
|
|
|
|
}
|
2014-09-24 14:21:43 +02:00
|
|
|
|
2014-10-11 09:33:10 +02:00
|
|
|
/**
|
|
|
|
* Get the PlotId
|
|
|
|
*
|
|
|
|
* @return PlotId
|
|
|
|
*/
|
|
|
|
public PlotId getPlotId() {
|
|
|
|
return this.id;
|
|
|
|
}
|
2014-09-24 14:21:43 +02:00
|
|
|
|
2014-10-11 09:33:10 +02:00
|
|
|
/**
|
|
|
|
* Get the world name
|
|
|
|
*
|
|
|
|
* @return String
|
|
|
|
*/
|
|
|
|
public String getWorld() {
|
|
|
|
return this.world;
|
|
|
|
}
|
2014-09-23 04:08:31 +02:00
|
|
|
|
2014-10-11 09:33:10 +02:00
|
|
|
public static HandlerList getHandlerList() {
|
|
|
|
return handlers;
|
|
|
|
}
|
2014-09-23 04:08:31 +02:00
|
|
|
|
2014-10-11 09:33:10 +02:00
|
|
|
@Override
|
|
|
|
public HandlerList getHandlers() {
|
|
|
|
return handlers;
|
|
|
|
}
|
2014-09-23 04:08:31 +02:00
|
|
|
|
2014-10-11 09:33:10 +02:00
|
|
|
@Override
|
|
|
|
public boolean isCancelled() {
|
|
|
|
return this.cancelled;
|
|
|
|
}
|
2014-09-23 04:08:31 +02:00
|
|
|
|
2014-10-11 09:33:10 +02:00
|
|
|
@Override
|
|
|
|
public void setCancelled(boolean b) {
|
|
|
|
this.cancelled = b;
|
|
|
|
}
|
2014-09-23 04:08:31 +02:00
|
|
|
}
|