can't change pvp state in combat and misc wolf fixes

This commit is contained in:
YouHaveTrouble
2020-08-21 15:46:47 +02:00
parent aab96c7a21
commit b9a4286a64
12 changed files with 68 additions and 14 deletions
@@ -24,4 +24,16 @@ public class CombatTimer {
refreshPlayersCombatTime(victim_uuid);
}
public static boolean isInCombat(UUID uuid) {
try {
long combattimer = (long) SmartCache.getPlayerData(uuid).get("combattime");
long now = Instant.now().getEpochSecond();
return combattimer > now;
} catch (Exception e) {
return false;
}
}
}