some more tweaking done

This commit is contained in:
nossr50 2010-12-01 13:15:37 -08:00
parent ce46e2d011
commit e5a97641b3

View File

@ -2,6 +2,7 @@ import java.io.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
public class vMinecraftUsers { public class vMinecraftUsers {
private static volatile vMinecraftUsers instance; private static volatile vMinecraftUsers instance;
protected static final Logger log = Logger.getLogger("Minecraft"); protected static final Logger log = Logger.getLogger("Minecraft");
@ -41,11 +42,13 @@ public class vMinecraftUsers {
public static void addUser(Player player){ public static void addUser(Player player){
FileWriter writer = null; FileWriter writer = null;
String location = "vminecraftusers.txt"; String location = "vminecraftusers.txt";
BufferedWriter bw = new BufferedWriter(new FileWriter(location, true));
try { try {
writer = new FileWriter(location); bw.append(player.getName()+"::::\r\n");
writer.append(player.getName()+"::::"); bw.newLine();
} catch (Exception e) { bw.close();
log.log(Level.SEVERE, "Exception while trying to add user with writer to " + location, e); } catch (IOException e) {
log.log(Level.SEVERE, "Exception while trying to add user with BufferedWriter to " + location, e);
} finally { } finally {
try { try {
if (writer != null) { if (writer != null) {
@ -63,4 +66,7 @@ public class vMinecraftUsers {
} }
return instance; return instance;
} }
public static void getRow(){
}
} }