diff options
author | Bryson Steck <steck.bryson@gmail.com> | 2021-06-15 18:43:25 -0600 |
---|---|---|
committer | Bryson Steck <steck.bryson@gmail.com> | 2021-06-15 18:43:25 -0600 |
commit | 8db9ccdf642ed81f585e900a843c411b973ce6da (patch) | |
tree | 54cac94efc109ec47a0111605dbbaae8c9d24fd0 /src/net/brysonsteck/Resurrection/PlayerData.java | |
parent | 7d5f60d921cd35ce82a24e75ebfd79a3fd64bfed (diff) | |
download | resurrection-8db9ccdf642ed81f585e900a843c411b973ce6da.tar resurrection-8db9ccdf642ed81f585e900a843c411b973ce6da.tar.gz resurrection-8db9ccdf642ed81f585e900a843c411b973ce6da.tar.bz2 |
starting to test timer
Diffstat (limited to 'src/net/brysonsteck/Resurrection/PlayerData.java')
-rw-r--r-- | src/net/brysonsteck/Resurrection/PlayerData.java | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/net/brysonsteck/Resurrection/PlayerData.java b/src/net/brysonsteck/Resurrection/PlayerData.java deleted file mode 100644 index f63a359..0000000 --- a/src/net/brysonsteck/Resurrection/PlayerData.java +++ /dev/null @@ -1,46 +0,0 @@ -package net.brysonsteck.Resurrection; - -import java.io.*; -import java.util.Arrays; -import java.util.Hashtable; - -public class PlayerData { - Hashtable<String, Hashtable<String, String>> playerData = new Hashtable<>(); - - public void saveData(String write) { - try { - FileWriter writer = new FileWriter("data/player.data"); - writer.write(write); - writer.close(); - readData(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - public void readData() { - try { - BufferedReader reader = new BufferedReader(new FileReader("data/player.data")); - String line = ""; - String[] playerData; - while (true) { - playerData = new String[3]; - line = reader.readLine(); - if (line == null) { - break; - } - playerData = line.split(","); - Hashtable<String, String> playerHash = new Hashtable<>(); - playerHash.put("dead", playerData[1]); - playerHash.put("timeLeft", playerData[2]); - this.playerData.put(playerData[0], playerHash); - } - } catch (IOException e) { - e.printStackTrace(); - } - } - - public Hashtable<String, Hashtable<String, String>> getPlayers() { - return playerData; - } -} |