Skip to content

Commit

Permalink
canPvp
Browse files Browse the repository at this point in the history
  • Loading branch information
Angeschossen committed Mar 4, 2024
1 parent 4756a8f commit 7ba4f62
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ dependencies {
}

group = "com.github.angeschossen"
version = "6.44.10"
version = "6.44.11"
description = "LandsAPI"
java.sourceCompatibility = JavaVersion.VERSION_1_8

Expand Down
10 changes: 10 additions & 0 deletions src/main/java/me/angeschossen/lands/api/land/Area.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ public interface Area extends ExpressionEntity, TaxHolder, SystemFlagStatesHolde
*/
boolean banPlayer(@NotNull UUID uuid);

/**
* Check if two players can fight each other in this area. This also takes wars into account.
*
* @param attacker the attacker
* @param target the target
* @param sendMessage if true, sends denied message if they can't fight each other in this area
* @return false, if they can't fight each other
*/
boolean canPvP(@NotNull LandPlayer attacker, LandPlayer target, boolean sendMessage);

/**
* Check if a player can enter this area. This depends on {@link #isBanned(UUID)} and on the land enter flag state for the player's role.
*
Expand Down

0 comments on commit 7ba4f62

Please # to comment.