Skip to content

Commit

Permalink
Changes to handling ignoring bungee time change votes
Browse files Browse the repository at this point in the history
  • Loading branch information
BenCodez committed Oct 23, 2023
1 parent f131ce9 commit 9d74b5e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions VotingPlugin/src/com/bencodez/votingplugin/BungeeHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ public boolean checkGlobalDataTime(TimeType type, HashMap<String, DataValue> dat
long lastUpdated = Long.valueOf(data.get("LastUpdated").getString()).longValue();
plugin.debug("LastUpdated: " + lastUpdated);
if (LocalDateTime.now().atZone(ZoneOffset.UTC).toInstant().toEpochMilli() - lastUpdated > 1000 * 60 * 60
* 1) {
plugin.getLogger().warning("Ignore bungee time change since it was more than 1 hour ago");
* 2) {
plugin.getLogger().warning("Ignoring bungee time change since it was more than 2 hours ago");
globalDataHandler.setBoolean(plugin.getBungeeSettings().getServer(), type.toString(), false);
return false;
}

Expand Down

0 comments on commit 9d74b5e

Please sign in to comment.