aboutsummaryrefslogtreecommitdiff
path: root/src/net/brysonsteck/PlayerData.java
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2021-06-06 11:49:01 -0600
committerBryson Steck <steck.bryson@gmail.com>2021-06-06 11:49:01 -0600
commitdb5c24bc26e4d6a34ecd1ab9118f0f098eee3581 (patch)
treebfd1fa99cab5e90c5cd3e4555dc06d0a82164fe1 /src/net/brysonsteck/PlayerData.java
parenta6193c66185c069db9a8f9f7a7aca570ae55994b (diff)
downloadresurrection-db5c24bc26e4d6a34ecd1ab9118f0f098eee3581.tar
resurrection-db5c24bc26e4d6a34ecd1ab9118f0f098eee3581.tar.gz
resurrection-db5c24bc26e4d6a34ecd1ab9118f0f098eee3581.tar.bz2
death event works, working on commands
Diffstat (limited to 'src/net/brysonsteck/PlayerData.java')
-rw-r--r--src/net/brysonsteck/PlayerData.java46
1 files changed, 0 insertions, 46 deletions
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<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;
- }
-}