Fixed a few issues from the merge, added the mod directory to the zip

backup.
This commit is contained in:
GJ
2012-05-05 13:51:54 -04:00
parent b529219a0e
commit 1b37ba8daa
9 changed files with 32 additions and 27 deletions

View File

@ -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.

View File

@ -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());
}