Placeholder for pvp mode

This commit is contained in:
Jules 2023-02-22 22:31:01 +01:00
parent 83b9c37c6a
commit fb270bf1b6

View File

@ -95,6 +95,9 @@ public class RPGPlaceholders extends PlaceholderExpansion {
else if (identifier.equals("in_combat")) else if (identifier.equals("in_combat"))
return String.valueOf(playerData.isInCombat()); return String.valueOf(playerData.isInCombat());
else if (identifier.equals("pvp_mode"))
return String.valueOf(playerData.getCombat().isInPvpMode());
else if (identifier.startsWith("since_enter_combat")) else if (identifier.startsWith("since_enter_combat"))
return playerData.isInCombat() ? MythicLib.plugin.getMMOConfig().decimal.format((System.currentTimeMillis() - playerData.getCombat().getFirstHit()) / 1000) : "-1"; return playerData.isInCombat() ? MythicLib.plugin.getMMOConfig().decimal.format((System.currentTimeMillis() - playerData.getCombat().getFirstHit()) / 1000) : "-1";