Class KonquestRuinCaptureEvent

java.lang.Object
org.bukkit.event.Event
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.

  • Constructor Details

    • KonquestRuinCaptureEvent

      public KonquestRuinCaptureEvent(KonquestAPI konquest, KonquestRuin ruin, KonquestPlayer player, List<? extends KonquestPlayer> rewardPlayers)
      Default constructor
      Parameters:
      konquest - The API instance
      ruin - The ruin
      player - The player
      rewardPlayers - The players receiving reward
  • Method Details

    • getPlayer

      public KonquestPlayer getPlayer()
      Gets the player that captured this ruin. This player broke the final critical block.
      Returns:
      The player
    • getRewardPlayers

      public List<? extends KonquestPlayer> 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 interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean val)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable