Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ public class VotingPluginMain extends AdvancedCorePlugin {
@Getter
private long lastBackgroundTaskTimeTaken = -1;

private boolean firstTimeLoaded = false;

@Getter
@Setter
Expand All @@ -291,25 +290,7 @@ public void basicBungeeUpdate() {
}
}

public void checkFirstTimeLoaded() {
if (!firstTimeLoaded) {

if (getGui().isChestVoteTopUseSkull()) {
int maxToLoad = 200;
for (TopVoter top : getTopVoter().keySet()) {
int num = 1;
Set<TopVoterPlayer> players = getTopVoter().get(top).keySet();
for (TopVoterPlayer p : players) {
if (num <= maxToLoad) {
getSkullCacheHandler().addToCache(p.getUuid(), p.getPlayerName());
}
num++;
}
}
}
}
firstTimeLoaded = true;
}


/**
* Check votifier.
Expand Down Expand Up @@ -351,9 +332,7 @@ public void loadVoteShopManager() {
voteShopManager = new VoteShopManager(this);
}

public ArrayList<TopVoterPlayer> convertSet(Set<TopVoterPlayer> set) {
return new ArrayList<>(set);
}


@Override
public FileConfiguration getConfig() {
Expand Down Expand Up @@ -1212,7 +1191,6 @@ public synchronized void update() {
serverData.updateValues();
getSigns().updateSigns();

Comment thread
BenCodez marked this conversation as resolved.
Resolved
checkFirstTimeLoaded();

if (plugin.getConfigFile().isDiscordSRVEnabled() && getDiscordHandler() != null) {
for (TopVoter top : TopVoter.values()) {
Expand Down
Loading
Loading