From db5c24bc26e4d6a34ecd1ab9118f0f098eee3581 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Sun, 6 Jun 2021 11:49:01 -0600 Subject: death event works, working on commands --- src/net/brysonsteck/PlayerData.java | 46 ------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 src/net/brysonsteck/PlayerData.java (limited to 'src/net/brysonsteck/PlayerData.java') diff --git a/src/net/brysonsteck/PlayerData.java b/src/net/brysonsteck/PlayerData.java deleted file mode 100644 index 556c147..0000000 --- a/src/net/brysonsteck/PlayerData.java +++ /dev/null @@ -1,46 +0,0 @@ -package net.brysonsteck; - -import java.io.*; -import java.util.Arrays; -import java.util.Hashtable; - -public class PlayerData { - Hashtable> 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 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> getPlayers() { - return playerData; - } -} -- cgit v1.2.3