Class KonquestRuinAttackEvent
java.lang.Object
org.bukkit.event.Event
com.github.rumsfield.konquest.api.event.KonquestEvent
com.github.rumsfield.konquest.api.event.ruin.KonquestRuinEvent
com.github.rumsfield.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.
-
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.Block
getBlock()
Gets the block broken by the attacker.boolean
void
setCancelled
(boolean val) Methods inherited from class com.github.rumsfield.konquest.api.event.ruin.KonquestRuinEvent
getRuin
Methods inherited from class com.github.rumsfield.konquest.api.event.KonquestEvent
getHandlerList, getHandlers, getKonquest
Methods 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:
isCancelled
in interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean val) - Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-