mirror of
https://github.com/YouHaveTrouble/PreventStabby.git
synced 2026-05-12 05:16:55 +00:00
refactors and basic api
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
package eu.endermite.togglepvp.util;
|
||||
|
||||
import eu.endermite.togglepvp.TogglePvP;
|
||||
import eu.endermite.togglepvp.TogglePvp;
|
||||
import eu.endermite.togglepvp.players.SmartCache;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.UUID;
|
||||
|
||||
@@ -13,9 +12,9 @@ public class CombatTimer {
|
||||
long now = Instant.now().getEpochSecond();
|
||||
long combattime = SmartCache.getPlayerData(uuid).getCombattime();
|
||||
if (combattime < now) {
|
||||
PluginMessages.sendActionBar(uuid, TogglePvP.getPlugin().getConfigCache().getEntering_combat());
|
||||
PluginMessages.sendActionBar(uuid, TogglePvp.getPlugin().getConfigCache().getEntering_combat());
|
||||
}
|
||||
TogglePvP.getPlugin().getPlayerManager().refreshPlayersCombatTime(uuid);
|
||||
TogglePvp.getPlugin().getPlayerManager().refreshPlayersCombatTime(uuid);
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
|
||||
@@ -32,8 +31,6 @@ public class CombatTimer {
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user