Skip to content

Commit

Permalink
7.10.13
Browse files Browse the repository at this point in the history
  • Loading branch information
Angeschossen committed Nov 28, 2024
1 parent 66d292c commit 321c69c
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ public interface CaptureFlag extends ExpressionEntity {
*/
@NotNull BlockPosition getPosition();

/**
* Get the team that placed the flag.
*
* @return either {@link WarTeam#ATTACKER} or {@link WarTeam#DEFENDER}
*/
@NotNull
WarTeam getTeam();

/**
Expand All @@ -35,12 +41,35 @@ public interface CaptureFlag extends ExpressionEntity {
*/
void setSecondsToHold(long secondsToHold);

/**
* Break this flag.
*
* @param player if a player broke that flag
* @param reward should the team be rewarded
* @param captured was it captured?
* @param exlosion create any explosion?
* @param reason reason of removal
* @return false, if a 3rd party plugin cancelled the removal
*/
CompletableFuture<Boolean> breakCaptureFlag(@Nullable LandPlayer player, boolean reward, boolean captured,
boolean exlosion, CaptureFlagBreakEvent.BreakReason reason);

/**
* Break this flag.
*
* @param player if a player broke that flag
* @param reward should the team be rewarded
* @param captured was it captured?
* @param reason reason of removal
* @return false, if a 3rd party plugin cancelled the removal
*/
CompletableFuture<Boolean> breakCaptureFlag(@Nullable LandPlayer player, boolean reward, boolean captured, boolean end,
boolean explosion, CaptureFlagBreakEvent.BreakReason reason);

/**
* Trigger code execution whenever the flag is unloaded.
* This is only relevant, if you implement your own capture flag.
*/
void atUnload();

/**
Expand Down

0 comments on commit 321c69c

Please # to comment.