Class KonquestRuinCaptureEvent
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.KonquestRuinCaptureEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class KonquestRuinCaptureEvent
extends KonquestRuinEvent
implements org.bukkit.event.Cancellable
Called before a player captures a ruin, but after
KonquestRuinAttackEvent
Players capture ruins by breaking all critical blocks inside. When the final critical block is broken, all players located inside of the ruin receive a reward. Canceling this event will stop the final critical block break and prevent the ruin from being captured.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorsConstructorDescriptionKonquestRuinCaptureEvent
(KonquestAPI konquest, KonquestRuin ruin, KonquestPlayer player, List<? extends KonquestPlayer> rewardPlayers) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionGets the player that captured this ruin.List<? extends KonquestPlayer>
Gets the list of players that get a reward for capturing the ruin.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
-
KonquestRuinCaptureEvent
public KonquestRuinCaptureEvent(KonquestAPI konquest, KonquestRuin ruin, KonquestPlayer player, List<? extends KonquestPlayer> rewardPlayers) Default constructor- Parameters:
konquest
- The API instanceruin
- The ruinplayer
- The playerrewardPlayers
- The players receiving reward
-
-
Method Details
-
getPlayer
Gets the player that captured this ruin. This player broke the final critical block.- Returns:
- The player
-
getRewardPlayers
Gets the list of players that get a reward for capturing the ruin.- Returns:
- The list of players
-
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
-