Skip to content

Commit

Permalink
Add bypass fail safe options for bungee time checking
Browse files Browse the repository at this point in the history
  • Loading branch information
BenCodez committed Dec 13, 2024
1 parent 76d7579 commit 0042045
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions VotingPlugin/src/com/bencodez/votingplugin/bungee/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ public String getBedrockPlayerPrefix() {
public boolean getOnlineMode() {
return getData().getBoolean("OnlineMode", true);
}

public boolean getTimeChangeFailSafeBypass() {
return getData().getBoolean("TimeChangeFailSafeBypass", false);
}

public boolean getUUIDLookup() {
return getData().getBoolean("UUIDLookup", true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,9 @@ public void debug(String text) {
voteCacheFile = new VoteCache(this);
voteCacheFile.load();

bungeeTimeChecker.setTimeChangeFailSafeBypass(config.getTimeChangeFailSafeBypass());
bungeeTimeChecker.loadTimer();


nonVotedPlayersCache = new NonVotedPlayersCache(this);
nonVotedPlayersCache.load();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ public boolean getOnlineMode() {
return getBoolean(getNode("OnlineMode"), true);
}

public boolean getTimeChangeFailSafeBypass() {
return getBoolean(getNode("TimeChangeFailSafeBypass"), false);
}

public boolean getStoreMonthTotalsWithDate() {
return getBoolean(getNode("StoreMonthTotalsWithDate"), false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,7 @@ public void debug(String text) {
voteCacheFile.save();
}

bungeeTimeChecker.setTimeChangeFailSafeBypass(config.getTimeChangeFailSafeBypass());
bungeeTimeChecker.loadTimer();

try {
Expand Down

0 comments on commit 0042045

Please sign in to comment.