2014-09-22 13:02:14 +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.
|
2014-11-05 04:42:08 +01:00
|
|
|
*
|
2014-10-12 09:37:36 +02:00
|
|
|
* >> File = PlayerClaimPlotEvent.java >> Generated by: Citymonstret at
|
|
|
|
* 2014-08-09 15:21
|
2014-09-22 13:02:14 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
package com.intellectualcrafters.plot.events;
|
|
|
|
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
import org.bukkit.event.Cancellable;
|
|
|
|
import org.bukkit.event.HandlerList;
|
|
|
|
import org.bukkit.event.player.PlayerEvent;
|
|
|
|
|
2014-09-24 14:21:43 +02:00
|
|
|
import com.intellectualcrafters.plot.Plot;
|
|
|
|
|
2014-09-22 13:02:14 +02:00
|
|
|
/**
|
|
|
|
* Created by Citymonstret on 2014-08-09.
|
|
|
|
*/
|
2014-09-24 14:21:43 +02:00
|
|
|
public class PlayerClaimPlotEvent extends PlayerEvent implements Cancellable {
|
2014-11-05 04:42:08 +01:00
|
|
|
private static HandlerList handlers = new HandlerList();
|
|
|
|
private boolean cancelled;
|
2014-09-22 13:02:14 +02:00
|
|
|
|
2014-11-05 04:42:08 +01:00
|
|
|
private final Plot plot;
|
2014-09-22 13:02:14 +02:00
|
|
|
|
2014-11-05 04:42:08 +01:00
|
|
|
/**
|
|
|
|
* PlayerClaimPlotEvent: Called when a plot is claimed
|
|
|
|
*
|
|
|
|
* @param player
|
|
|
|
* @param plot
|
|
|
|
*/
|
|
|
|
public PlayerClaimPlotEvent(final Player player, final Plot plot) {
|
|
|
|
super(player);
|
|
|
|
this.plot = plot;
|
|
|
|
}
|
2014-10-03 04:36:30 +02:00
|
|
|
|
2014-11-05 04:42:08 +01:00
|
|
|
/**
|
|
|
|
* Get the plot involved
|
|
|
|
*
|
|
|
|
* @return Plot
|
|
|
|
*/
|
|
|
|
public Plot getPlot() {
|
|
|
|
return this.plot;
|
|
|
|
}
|
2014-09-24 14:21:43 +02:00
|
|
|
|
2014-11-05 04:42:08 +01:00
|
|
|
public static HandlerList getHandlerList() {
|
|
|
|
return handlers;
|
|
|
|
}
|
2014-09-22 13:02:14 +02:00
|
|
|
|
2014-11-05 04:42:08 +01:00
|
|
|
@Override
|
|
|
|
public HandlerList getHandlers() {
|
|
|
|
return handlers;
|
|
|
|
}
|
2014-09-22 13:02:14 +02:00
|
|
|
|
2014-11-05 04:42:08 +01:00
|
|
|
@Override
|
|
|
|
public boolean isCancelled() {
|
|
|
|
return this.cancelled;
|
|
|
|
}
|
2014-09-22 13:02:14 +02:00
|
|
|
|
2014-11-05 04:42:08 +01:00
|
|
|
@Override
|
|
|
|
public void setCancelled(final boolean b) {
|
|
|
|
this.cancelled = b;
|
|
|
|
}
|
2014-09-22 13:02:14 +02:00
|
|
|
}
|