Skip to content

Commit

Permalink
1.2
Browse files Browse the repository at this point in the history
-Add Nicer Logging System
  • Loading branch information
MrTronMan committed Jul 9, 2022
1 parent 6d6f155 commit a3a47d4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.tronmc.beta</groupId>
<artifactId>Amend</artifactId>
<version>1.1.2--V.1.19</version>
<version>1.2--V.1.19</version>
<packaging>jar</packaging>

<name>Amend</name>
Expand Down
16 changes: 15 additions & 1 deletion src/main/java/com/tronmc/beta/amend/Amend.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.Scanner;
import java.util.concurrent.TimeUnit;

import com.google.gson.Gson;
import com.google.gson.JsonObject;
Expand All @@ -19,7 +20,7 @@ public final class Amend extends JavaPlugin {

@Override
public void onEnable() {
Bukkit.getLogger().info("Amend is on standby, ready for updates on shutdown.");
getLogger().info("Amend is on standby, ready for updates on shutdown.");

}

Expand Down Expand Up @@ -56,10 +57,23 @@ public void onDisable() {
Files.copy(in, Paths.get("purpur.jar"), StandardCopyOption.REPLACE_EXISTING);
Bukkit.getLogger().info("Update Completed!");
Bukkit.getLogger().warning("-------------------------------");
try {
TimeUnit.SECONDS.sleep(3);
} catch (InterruptedException e) {
e.printStackTrace();
}
getLogger().info("Successfully updated & disabled Amend!");
} else {
Bukkit.getLogger().info("Server is up to date!");
Bukkit.getLogger().info("Closing plugin...");
Bukkit.getLogger().warning("-------------------------------");
try {
TimeUnit.SECONDS.sleep(3);
} catch (InterruptedException e) {
e.printStackTrace();
}
getLogger().info("Successfully disabled Amend!");

}
} catch (IOException e) {
e.printStackTrace();
Expand Down

0 comments on commit a3a47d4

Please sign in to comment.