Package konquest.api.event.ruin
Class KonquestRuinAttackEvent
java.lang.Object
org.bukkit.event.Event
konquest.api.event.KonquestEvent
konquest.api.event.ruin.KonquestRuinEvent
konquest.api.event.ruin.KonquestRuinAttackEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class KonquestRuinAttackEvent
extends KonquestRuinEvent
implements org.bukkit.event.Cancellable
Called when a player breaks a critical block within a ruin, but before
KonquestRuinCaptureEvent
Players can only break critical blocks inside of ruins. Canceling this event prevents the block from braking.
- Author:
- Rumsfield
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionKonquestRuinAttackEvent(KonquestAPI konquest, KonquestRuin ruin, KonquestPlayer attacker, org.bukkit.block.Block block) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionGets the attacking player.org.bukkit.block.BlockgetBlock()Gets the block broken by the attacker.booleanvoidsetCancelled(boolean val) Methods inherited from class konquest.api.event.ruin.KonquestRuinEvent
getRuinMethods inherited from class konquest.api.event.KonquestEvent
getHandlerList, getHandlers, getKonquestMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
KonquestRuinAttackEvent
public KonquestRuinAttackEvent(KonquestAPI konquest, KonquestRuin ruin, KonquestPlayer attacker, org.bukkit.block.Block block) Default constructor- Parameters:
konquest- The API instanceruin- The ruinattacker- The attacking playerblock- The block
-
-
Method Details
-
getAttacker
Gets the attacking player.- Returns:
- The attacker
-
getBlock
public org.bukkit.block.Block getBlock()Gets the block broken by the attacker.- Returns:
- The block
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean val) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-