mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
A few changes :3
This commit is contained in:
parent
25940bf5cf
commit
8b981cde75
@ -121,7 +121,8 @@ public class Leaderboard {
|
||||
String theLocation = "plugins/mcMMO/FlatFileStuff/Leaderboards/" + statName + ".mcmmo"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
//CHECK IF THE FILE EXISTS
|
||||
File theDir = new File(theLocation);
|
||||
if(!theDir.exists()){
|
||||
if(!theDir.exists())
|
||||
{
|
||||
//properties = new PropertiesFile(location);
|
||||
FileWriter writer = null;
|
||||
try {
|
||||
|
@ -14,6 +14,8 @@ public class Users {
|
||||
private static volatile Users instance;
|
||||
protected static final Logger log = Logger.getLogger("Minecraft");
|
||||
String location = "plugins/mcMMO/FlatFileStuff/mcmmo.users";
|
||||
String directory = "plugins/mcMMO/FlatFileStuff/";
|
||||
String directoryb = "plugins/mcMMO/FlatFileStuff/Leaderboards/";
|
||||
|
||||
//public static ArrayList<PlayerProfile> players;
|
||||
public static HashMap<Player, PlayerProfile> players = new HashMap<Player, PlayerProfile>();
|
||||
@ -36,14 +38,18 @@ public class Users {
|
||||
|
||||
public void loadUsers()
|
||||
{
|
||||
new File(directory).mkdir();
|
||||
new File(directoryb).mkdir();
|
||||
File theDir = new File(location);
|
||||
if(!theDir.exists()){
|
||||
if(!theDir.exists())
|
||||
{
|
||||
//properties = new PropertiesFile(location);
|
||||
FileWriter writer = null;
|
||||
try {
|
||||
writer = new FileWriter(location);
|
||||
//writer.write("#Storage place for user information\r\n");
|
||||
} catch (Exception e) {
|
||||
} catch (Exception e)
|
||||
{
|
||||
log.log(Level.SEVERE, "Exception while creating " + location, e);
|
||||
} finally {
|
||||
try {
|
||||
|
@ -50,7 +50,7 @@ public class PlayerProfile
|
||||
|
||||
//Time to HashMap this shiz
|
||||
HashMap<String, Integer> stats = new HashMap<String, Integer>(); //Skills and XP
|
||||
String location = "plugins/mcMMO/mcmmo.users";
|
||||
String location = "plugins/mcMMO/FlatFileStuff/mcmmo.users";
|
||||
|
||||
public PlayerProfile(Player player)
|
||||
{
|
||||
|
@ -116,8 +116,6 @@ public class Skills {
|
||||
}
|
||||
public static void monitorSkills(Player player){
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
if(PP == null)
|
||||
Users.addUser(player);
|
||||
if(PP != null)
|
||||
{
|
||||
if(PP.getHoePreparationMode() && System.currentTimeMillis() - PP.getHoePreparationATS() >= 4000){
|
||||
|
Loading…
Reference in New Issue
Block a user