mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Fixed a few issues from the merge, added the mod directory to the zip
backup.
This commit is contained in:
@ -14,9 +14,9 @@ import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.datatypes.Tree;
|
||||
|
||||
public class Leaderboard {
|
||||
private static String leaderboardsDirectory = mcMMO.p.leaderboardDirectory;
|
||||
private static String location = mcMMO.p.usersFile;
|
||||
private static mcMMO plugin = mcMMO.p;
|
||||
private static String leaderboardsDirectory = plugin.leaderboardDirectory;
|
||||
private static String location = plugin.usersFile;
|
||||
|
||||
/**
|
||||
* Create the leaderboards.
|
||||
|
@ -12,16 +12,19 @@ import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
|
||||
public class Users {
|
||||
|
||||
private final static mcMMO plugin = mcMMO.p;
|
||||
public static HashMap<String, PlayerProfile> players = new HashMap<String, PlayerProfile>();
|
||||
|
||||
|
||||
/**
|
||||
* Load users.
|
||||
*/
|
||||
public static void loadUsers() {
|
||||
new File(mcMMO.p.flatFileDirectory).mkdir();
|
||||
new File(mcMMO.p.leaderboardDirectory).mkdir();
|
||||
File theDir = new File(mcMMO.p.usersFile);
|
||||
|
||||
|
||||
new File(plugin.flatFileDirectory).mkdir();
|
||||
new File(plugin.leaderboardDirectory).mkdir();
|
||||
File theDir = new File(plugin.usersFile);
|
||||
|
||||
if (!theDir.exists()) {
|
||||
try {
|
||||
@ -101,7 +104,7 @@ public class Users {
|
||||
* @return the player's profile
|
||||
*/
|
||||
public static PlayerProfile getProfileByName(String playerName) {
|
||||
if (mcMMO.p.getServer().getOfflinePlayer(playerName).isOnline() || players.containsKey(playerName.toLowerCase())) {
|
||||
if (plugin.getServer().getOfflinePlayer(playerName).isOnline() || players.containsKey(playerName.toLowerCase())) {
|
||||
if (players.containsKey(playerName.toLowerCase())) {
|
||||
return players.get(playerName.toLowerCase());
|
||||
}
|
||||
|
Reference in New Issue
Block a user