PlotSquared/PlotSquared/src/main/java/com/intellectualcrafters/plot/events/PlayerClaimPlotEvent.java

67 lines
1.5 KiB
Java
Raw Normal View History

2014-09-22 13:02:14 +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
*
* >> 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;
import com.intellectualcrafters.plot.Plot;
2014-09-22 13:02:14 +02:00
/**
* Created by Citymonstret on 2014-08-09.
*/
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-11-05 04:42:08 +01:00
/**
* Get the plot involved
*
* @return Plot
*/
public Plot getPlot() {
return this.plot;
}
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
}