mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
some more tweaking done
This commit is contained in:
parent
ce46e2d011
commit
e5a97641b3
@ -2,6 +2,7 @@ import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class vMinecraftUsers {
|
||||
private static volatile vMinecraftUsers instance;
|
||||
protected static final Logger log = Logger.getLogger("Minecraft");
|
||||
@ -41,11 +42,13 @@ public class vMinecraftUsers {
|
||||
public static void addUser(Player player){
|
||||
FileWriter writer = null;
|
||||
String location = "vminecraftusers.txt";
|
||||
BufferedWriter bw = new BufferedWriter(new FileWriter(location, true));
|
||||
try {
|
||||
writer = new FileWriter(location);
|
||||
writer.append(player.getName()+"::::");
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "Exception while trying to add user with writer to " + location, e);
|
||||
bw.append(player.getName()+"::::\r\n");
|
||||
bw.newLine();
|
||||
bw.close();
|
||||
} catch (IOException e) {
|
||||
log.log(Level.SEVERE, "Exception while trying to add user with BufferedWriter to " + location, e);
|
||||
} finally {
|
||||
try {
|
||||
if (writer != null) {
|
||||
@ -63,4 +66,7 @@ public class vMinecraftUsers {
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
public static void getRow(){
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user