Skip to content

Commit

Permalink
Add extra time change checks on login
Browse files Browse the repository at this point in the history
  • Loading branch information
BenCodez committed Dec 13, 2024
1 parent a3a1b46 commit 1afd825
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,12 @@ public void login(ProxiedPlayer p) {
@Override
public void run() {
if (isOnline(p)) {
if (getConfig().getGlobalDataEnabled()) {
if (getGlobalDataHandler().isTimeChangedHappened()) {
getGlobalDataHandler().checkForFinishedTimeChanges();
}
}

checkCachedVotes(server);
checkOnlineVotes(proxiedPlayer, proxiedPlayer.getUniqueId().toString(), server);
multiProxyHandler.login(proxiedPlayer.getUniqueId().toString(), proxiedPlayer.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,12 @@ public void onPluginMessagingReceived(PluginMessageEvent event) {

@Override
public void run() {
if (getConfig().getGlobalDataEnabled()) {
if (getGlobalDataHandler().isTimeChangedHappened()) {
getGlobalDataHandler().checkForFinishedTimeChanges();
}
}

debug("Checking offline votes for " + p.getUsername() + "/"
+ p.getUniqueId().toString());
checkCachedVotes(server);
Expand Down Expand Up @@ -1015,6 +1021,12 @@ protected void onMessage(String channel, String[] message) {

@Override
public void run() {
if (getConfig().getGlobalDataEnabled()) {
if (getGlobalDataHandler().isTimeChangedHappened()) {
getGlobalDataHandler().checkForFinishedTimeChanges();
}
}

checkCachedVotes(server);
checkOnlineVotes(p1, p.getUniqueId().toString(), server);
getMultiProxyHandler().login(p1.getUniqueId().toString(),
Expand Down

0 comments on commit 1afd825

Please sign in to comment.