aboutsummaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/brysonsteck/Resurrection/Resurrection.java2
-rw-r--r--src/net/brysonsteck/Resurrection/commands/CommandAbout.java2
-rw-r--r--src/net/brysonsteck/Resurrection/player/PlayerData.java4
-rw-r--r--src/net/brysonsteck/Resurrection/player/TimeCheck.java4
4 files changed, 7 insertions, 5 deletions
diff --git a/src/net/brysonsteck/Resurrection/Resurrection.java b/src/net/brysonsteck/Resurrection/Resurrection.java
index 50aa642..e301d2b 100644
--- a/src/net/brysonsteck/Resurrection/Resurrection.java
+++ b/src/net/brysonsteck/Resurrection/Resurrection.java
@@ -137,7 +137,7 @@ public class Resurrection extends JavaPlugin implements Listener {
// String[] array = ";bryzinga,false,0".split(";");
// System.out.println(array.length);
- TimeCheck timeCheck = new TimeCheck((System.currentTimeMillis() + 86400000) - System.currentTimeMillis());
+ TimeCheck timeCheck = new TimeCheck((System.currentTimeMillis() + 86212345) - System.currentTimeMillis());
System.out.println(timeCheck.formatTime());
}
diff --git a/src/net/brysonsteck/Resurrection/commands/CommandAbout.java b/src/net/brysonsteck/Resurrection/commands/CommandAbout.java
index aedf0be..1bf27fb 100644
--- a/src/net/brysonsteck/Resurrection/commands/CommandAbout.java
+++ b/src/net/brysonsteck/Resurrection/commands/CommandAbout.java
@@ -37,7 +37,7 @@ public class CommandAbout implements CommandExecutor {
p.sendMessage("");
}
p.sendMessage(ChatColor.YELLOW + "\u00a9 2021 Bryson Steck");
- p.sendMessage(ChatColor.YELLOW + "This plugin is licensed under the GNU Affero General Public License v3.0. Read more here: ");
+ p.sendMessage(ChatColor.YELLOW + "This plugin is licensed under the GNU Affero General Public License v3.0. Read more here: https://www.gnu.org/licenses/agpl-3.0.en.html");
p.sendMessage(ChatColor.YELLOW + "For more information on this plugin or to download it for yourself, visit the GitHub repository at https://github.com/brysonsteck/resurrection");
} else {
System.out.println(aboutMessage);
diff --git a/src/net/brysonsteck/Resurrection/player/PlayerData.java b/src/net/brysonsteck/Resurrection/player/PlayerData.java
index 4201cb3..512c94f 100644
--- a/src/net/brysonsteck/Resurrection/player/PlayerData.java
+++ b/src/net/brysonsteck/Resurrection/player/PlayerData.java
@@ -13,7 +13,7 @@ public class PlayerData {
public void saveData(String write) {
try {
- FileWriter writer = new FileWriter("playerData.resurrection");
+ FileWriter writer = new FileWriter("plugins/playerData.resurrection");
writer.write(write);
writer.close();
} catch (IOException e) {
@@ -25,7 +25,7 @@ public class PlayerData {
public void readData() {
try {
rawData = "";
- BufferedReader reader = new BufferedReader(new FileReader("playerData.resurrection"));
+ BufferedReader reader = new BufferedReader(new FileReader("plugins/playerData.resurrection"));
String line = "";
String[] playerData;
while (true) {
diff --git a/src/net/brysonsteck/Resurrection/player/TimeCheck.java b/src/net/brysonsteck/Resurrection/player/TimeCheck.java
index f1cf004..dc989ea 100644
--- a/src/net/brysonsteck/Resurrection/player/TimeCheck.java
+++ b/src/net/brysonsteck/Resurrection/player/TimeCheck.java
@@ -10,9 +10,11 @@ public class TimeCheck {
}
public String formatTime() {
+ long hours = TimeUnit.MILLISECONDS.toHours(millis);
+
String formattedTime = String.format("%d hrs, %d min, %d sec",
TimeUnit.MILLISECONDS.toHours(millis),
- TimeUnit.MILLISECONDS.toMinutes(millis),
+ TimeUnit.MILLISECONDS.toMinutes(millis) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(millis)),
TimeUnit.MILLISECONDS.toSeconds(millis) -
TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(millis)));
return formattedTime;