mirror of
https://github.com/YouHaveTrouble/PreventStabby.git
synced 2026-05-12 05:16:55 +00:00
can't change pvp state in combat and misc wolf fixes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user