From afd3d4098ee33ca98e3c029ac2183b75e343db8e Mon Sep 17 00:00:00 2001 From: bloodshot Date: Fri, 13 Nov 2020 17:51:42 -0500 Subject: [PATCH] Add 'pvp_combat_active' placeholder. Fixes #306 --- .../java/com/griefdefender/provider/PlaceholderProvider.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bukkit/src/main/java/com/griefdefender/provider/PlaceholderProvider.java b/bukkit/src/main/java/com/griefdefender/provider/PlaceholderProvider.java index 7f99407..3fc11b7 100644 --- a/bukkit/src/main/java/com/griefdefender/provider/PlaceholderProvider.java +++ b/bukkit/src/main/java/com/griefdefender/provider/PlaceholderProvider.java @@ -154,6 +154,11 @@ public String onRequest(OfflinePlayer offlinePlayer, String identifier) { return ""; } return String.valueOf(PlayerUtil.getInstance().canPlayerPvP((GDClaim) claim, user)); + case "pvp_combat_active" : + if (claim == null) { + return ""; + } + return String.valueOf(playerData.getPvpCombatTimeRemaining((GDClaim) claim) > 0); case "blocks_total" : final int initial = playerData.getInitialClaimBlocks(); final int accrued = playerData.getAccruedClaimBlocks();