mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 18:24:43 +02:00
@ -10,6 +10,7 @@ import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.blockmeta.HashChunkManager;
|
||||
import com.gmail.nossr50.util.skills.SkillTools;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -484,15 +485,16 @@ public final class FlatFileDatabaseManager implements DatabaseManager {
|
||||
return statsList.subList(Math.min(fromIndex, statsList.size()), Math.min(fromIndex + statsPerPage, statsList.size()));
|
||||
}
|
||||
|
||||
public Map<PrimarySkillType, Integer> readRank(String playerName) {
|
||||
public @NotNull HashMap<PrimarySkillType, Integer> readRank(String playerName) {
|
||||
updateLeaderboards();
|
||||
|
||||
Map<PrimarySkillType, Integer> skills = new EnumMap<PrimarySkillType, Integer>(PrimarySkillType.class);
|
||||
HashMap<PrimarySkillType, Integer> skills = new HashMap<>();
|
||||
|
||||
for (PrimarySkillType skill : SkillTools.NON_CHILD_SKILLS) {
|
||||
skills.put(skill, getPlayerRank(playerName, playerStatHash.get(skill)));
|
||||
}
|
||||
|
||||
//TODO: Gross
|
||||
skills.put(null, getPlayerRank(playerName, powerLevels));
|
||||
|
||||
return skills;
|
||||
|
@ -18,6 +18,7 @@ import com.gmail.nossr50.database.DatabaseManagerFactory;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.subskills.acrobatics.Roll;
|
||||
import com.gmail.nossr50.listeners.*;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
import com.gmail.nossr50.runnables.SaveTimerTask;
|
||||
import com.gmail.nossr50.runnables.backups.CleanBackupsTask;
|
||||
@ -337,6 +338,7 @@ public class mcMMO extends JavaPlugin {
|
||||
|
||||
transientEntityTracker = new TransientEntityTracker();
|
||||
setServerShutdown(false); //Reset flag, used to make decisions about async saves
|
||||
LocaleLoader.reloadLocale(); //Apply override locale
|
||||
}
|
||||
|
||||
public static PlayerLevelUtils getPlayerLevelUtils() {
|
||||
|
Reference in New Issue
Block a user