2012-06-08 15:28:36 +02:00
|
|
|
package com.Acrobot.ChestShop.Events.Protection;
|
2012-05-10 16:32:25 +02:00
|
|
|
|
|
|
|
import org.bukkit.block.Block;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
import org.bukkit.event.Event;
|
|
|
|
import org.bukkit.event.HandlerList;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Acrobot
|
|
|
|
*/
|
|
|
|
public class ProtectionCheckEvent extends Event {
|
|
|
|
private static final HandlerList handlers = new HandlerList();
|
|
|
|
|
|
|
|
private Result result = Result.DEFAULT;
|
2012-09-12 12:35:48 +02:00
|
|
|
private boolean ignoreBuiltInProtection = false;
|
2012-05-10 16:32:25 +02:00
|
|
|
private Block block;
|
|
|
|
private Player player;
|
|
|
|
|
|
|
|
public ProtectionCheckEvent(Block block, Player player) {
|
|
|
|
this.block = block;
|
|
|
|
this.player = player;
|
|
|
|
}
|
|
|
|
|
2012-09-12 12:35:48 +02:00
|
|
|
public ProtectionCheckEvent(Block block, Player player, boolean ignoreBuiltInProtection) {
|
|
|
|
this.block = block;
|
|
|
|
this.player = player;
|
|
|
|
this.ignoreBuiltInProtection = ignoreBuiltInProtection;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean isBuiltInProtectionIgnored() {
|
|
|
|
return ignoreBuiltInProtection;
|
|
|
|
}
|
|
|
|
|
2012-05-10 16:32:25 +02:00
|
|
|
public Result getResult() {
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setResult(Result result) {
|
|
|
|
this.result = result;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Player getPlayer() {
|
|
|
|
return player;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Block getBlock() {
|
|
|
|
return block;
|
|
|
|
}
|
|
|
|
|
|
|
|
public HandlerList getHandlers() {
|
|
|
|
return handlers;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static HandlerList getHandlerList() {
|
|
|
|
return handlers;
|
|
|
|
}
|
|
|
|
}
|