aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2021-06-16 17:18:52 -0600
committerBryson Steck <steck.bryson@gmail.com>2021-06-16 17:18:52 -0600
commitbf005f030be6658f2d2a7180b5c5ce32af5f68ae (patch)
treea24faf756ecd6a854b1f553790cb30ae0c4f2a41 /src
parentbb6e126297ac0767ee1e174eb3a7d710f2b7ab2b (diff)
downloadresurrection-bf005f030be6658f2d2a7180b5c5ce32af5f68ae.tar
resurrection-bf005f030be6658f2d2a7180b5c5ce32af5f68ae.tar.gz
resurrection-bf005f030be6658f2d2a7180b5c5ce32af5f68ae.tar.bz2
acutally fixed file location
Diffstat (limited to 'src')
-rw-r--r--src/net/brysonsteck/Resurrection/Resurrection.java67
-rw-r--r--src/net/brysonsteck/Resurrection/player/PlayerData.java2
2 files changed, 35 insertions, 34 deletions
diff --git a/src/net/brysonsteck/Resurrection/Resurrection.java b/src/net/brysonsteck/Resurrection/Resurrection.java
index bb86e5f..68074b8 100644
--- a/src/net/brysonsteck/Resurrection/Resurrection.java
+++ b/src/net/brysonsteck/Resurrection/Resurrection.java
@@ -25,6 +25,8 @@ public class Resurrection extends JavaPlugin implements Listener {
@Override
public void onEnable() {
super.onEnable();
+ System.out.println("[Resurrection] ---------------------------------------------------------");
+
System.out.println("[Resurrection] Resurrection is starting!");
PluginDescriptionFile pluginInfo = getDescription();
getServer().getPluginManager().registerEvents(this, this);
@@ -64,7 +66,6 @@ public class Resurrection extends JavaPlugin implements Listener {
System.out.println("[Resurrection] ---------------------------------------------------------");
-
// check for updates
System.out.println("[Resurrection] Checking for updates...");
CheckForUpdate check = new CheckForUpdate();
@@ -80,11 +81,11 @@ public class Resurrection extends JavaPlugin implements Listener {
System.out.println("[Resurrection] ---------------------------------------------------------");
+ System.out.println("[Resurrection] Registering listeners and adding commands...");
// register listener
this.getServer().getPluginManager().registerEvents(new PlayerListener(), this);
// register commands
- System.out.println("[Resurrection] Adding commands...");
this.getCommand("about").setExecutor(new CommandAbout());
this.getCommand("resurrect").setExecutor(new CommandResurrect());
@@ -97,37 +98,37 @@ public class Resurrection extends JavaPlugin implements Listener {
public static void main(String[] args) {
// DO THIS
- PlayerData playerData = new PlayerData();
- System.out.println("--- Reading Player data file ---");
- playerData.readData();
- System.out.println(playerData.getPlayers());
- System.out.println(playerData.getRawData());
- System.out.println("--- Oh look! A new player joined. Adding them. ---");
- String rawData = playerData.getRawData();
- rawData = rawData + ";bryzinga,false,0";
- playerData.saveData(rawData);
- System.out.println(playerData.getPlayers());
- System.out.println(playerData.getRawData());
- System.out.println("--- A player has died! Update the data file! ---");
- rawData = playerData.getRawData();
- String[] rawPlayers = rawData.split(";");
- String[] rawSinglePlayer = new String[3];
- int index = 0;
- for (String players : rawPlayers) {
- if (players.startsWith("bryzinga")) {
- String[] playerSplit = players.split(",");
- playerSplit[1] = "true";
- playerSplit[2] = "12345";
-
- rawPlayers[index] = String.join(",", playerSplit);
- break;
-
- }
- index++;
- }
- rawData = String.join(";", rawPlayers);
- playerData.saveData(rawData);
- System.out.println(rawData);
+// PlayerData playerData = new PlayerData();
+// System.out.println("--- Reading Player data file ---");
+// playerData.readData();
+// System.out.println(playerData.getPlayers());
+// System.out.println(playerData.getRawData());
+// System.out.println("--- Oh look! A new player joined. Adding them. ---");
+// String rawData = playerData.getRawData();
+// rawData = rawData + ";bryzinga,false,0";
+// playerData.saveData(rawData);
+// System.out.println(playerData.getPlayers());
+// System.out.println(playerData.getRawData());
+// System.out.println("--- A player has died! Update the data file! ---");
+// rawData = playerData.getRawData();
+// String[] rawPlayers = rawData.split(";");
+// String[] rawSinglePlayer = new String[3];
+// int index = 0;
+// for (String players : rawPlayers) {
+// if (players.startsWith("bryzinga")) {
+// String[] playerSplit = players.split(",");
+// playerSplit[1] = "true";
+// playerSplit[2] = "12345";
+//
+// rawPlayers[index] = String.join(",", playerSplit);
+// break;
+//
+// }
+// index++;
+// }
+// rawData = String.join(";", rawPlayers);
+// playerData.saveData(rawData);
+// System.out.println(rawData);
}
diff --git a/src/net/brysonsteck/Resurrection/player/PlayerData.java b/src/net/brysonsteck/Resurrection/player/PlayerData.java
index bdba51d..4201cb3 100644
--- a/src/net/brysonsteck/Resurrection/player/PlayerData.java
+++ b/src/net/brysonsteck/Resurrection/player/PlayerData.java
@@ -25,7 +25,7 @@ public class PlayerData {
public void readData() {
try {
rawData = "";
- BufferedReader reader = new BufferedReader(new FileReader("data/playerData.resurrection"));
+ BufferedReader reader = new BufferedReader(new FileReader("playerData.resurrection"));
String line = "";
String[] playerData;
while (true) {