aboutsummaryrefslogtreecommitdiff
path: root/src/net/brysonsteck/Resurrection/player
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2022-01-04 00:36:47 -0700
committerBryson Steck <steck.bryson@gmail.com>2022-01-04 00:36:47 -0700
commit7ab8389f0f2c61056fccbe827a105413300c0789 (patch)
tree2ddd89082c6fe6d8311deaa0e053e2007503c101 /src/net/brysonsteck/Resurrection/player
parent8dcde3ca41f45e899127891dcc64b65a6d432d55 (diff)
downloadresurrection-7ab8389f0f2c61056fccbe827a105413300c0789.tar
resurrection-7ab8389f0f2c61056fccbe827a105413300c0789.tar.gz
resurrection-7ab8389f0f2c61056fccbe827a105413300c0789.tar.bz2
fixed all System.out calls, added command
Diffstat (limited to 'src/net/brysonsteck/Resurrection/player')
-rw-r--r--src/net/brysonsteck/Resurrection/player/PlayerData.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/net/brysonsteck/Resurrection/player/PlayerData.java b/src/net/brysonsteck/Resurrection/player/PlayerData.java
index 89df20f..1ea7e29 100644
--- a/src/net/brysonsteck/Resurrection/player/PlayerData.java
+++ b/src/net/brysonsteck/Resurrection/player/PlayerData.java
@@ -9,12 +9,14 @@ import org.bukkit.plugin.java.JavaPlugin;
import java.io.*;
import java.util.Hashtable;
+import java.util.logging.Logger;
public class PlayerData {
Hashtable<String, Hashtable<String, String>> playerData = new Hashtable<>();
String rawData;
boolean DEBUG = Boolean.parseBoolean(new ParseSettings()
.getSetting("debug"));
+ Logger log = JavaPlugin.getProvidingPlugin(Resurrection.class).getLogger();
public void saveData(String write) {
try {
@@ -28,10 +30,10 @@ public class PlayerData {
if (DEBUG) {
Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + "[Res. DEBUG]: Error occurred while trying to save player data, avoid shutting down the server");
}
- System.out.println("[Resurrection] There was an issue saving the player data file.");
+ log.warning("There was an issue saving the player data file.");
e.printStackTrace();
- System.out.println("[Resurrection] Resurrection will continue to run despite this error, but avoid shutting down the server until a successful save occurs.");
- System.out.println("[Resurrection] In the mean time, check to make sure the playerData file exists and you have permissions to write to it.");
+ log.warning("Resurrection will continue to run despite this error, but avoid shutting down the server until a successful save occurs.");
+ log.warning("In the mean time, check to make sure the playerData file exists and you have permissions to write to it.");
}
if (DEBUG) {
Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + "[Res. DEBUG]: Player data saved successfully, rereading data to ensure Resurrection is up to date");
@@ -70,9 +72,9 @@ public class PlayerData {
Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + "[Res. DEBUG]: Error occurred while trying to read player data. Resurrection is shutting down");
}
- System.out.println("[Resurrection] There was an issue reading the player data file.");
+ log.severe("There was an issue reading the player data file.");
e.printStackTrace();
- System.out.println("[Resurrection] This file is crucial to Resurrection. Since the file could not be read, the plugin will now stop.");
+ log.severe("This file is crucial to Resurrection. Since the file could not be read, the plugin will now stop.");
Bukkit.getPluginManager().disablePlugin(JavaPlugin.getProvidingPlugin(Resurrection.class));
}
if (DEBUG) {