Skip to content

Commit

Permalink
1.6
Browse files Browse the repository at this point in the history
- Updated to 1.19.4. Also added minor log changes.
  • Loading branch information
MrTronMan committed Mar 19, 2023
1 parent 1bdd220 commit 5036634
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 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.5--V.1.19.3</version>
<version>1.6--V.1.19.4</version>
<packaging>jar</packaging>
<name>Amend</name>

Expand Down
16 changes: 8 additions & 8 deletions src/main/java/com/tronmc/beta/amend/Amend.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ public void onDisable() {
//Boolean ForcedUpdate = this.getConfig().getBoolean("force-update");
int start = BukkitVersion.indexOf("MC: ") + 4;
int end = BukkitVersion.length() - 1;
if (BukkitVersion.substring(start, end).equals("1.19.3")) {
if (BukkitVersion.substring(start, end).equals("1.19.4")) {

if (ServerType.equals("paper")) {
URLConnection connection = null;
try {
connection = new URL("https://api.tronmc.com/amend/versions/paper/1.19.3").openConnection();
connection = new URL("https://api.tronmc.com/amend/versions/paper/1.19.4").openConnection();
} catch (IOException e) {
e.printStackTrace();
}
Expand All @@ -134,7 +134,7 @@ public void onDisable() {
if (version != latest) {
getLogger().warning("Version is NOT up to date! Newest PAPER version is " + latest);
getLogger().info("Downloading update and applying to " + serverJarName + "...");
InputStream in = new URL("https://api.papermc.io/v2/projects/paper/versions/1.19.3/builds/" + response + "/downloads/paper-1.19.3-" + response + ".jar").openStream();
InputStream in = new URL("https://api.papermc.io/v2/projects/paper/versions/1.19.4/builds/" + response + "/downloads/paper-1.19.4-" + response + ".jar").openStream();
Files.copy(in, Paths.get(serverJarName), StandardCopyOption.REPLACE_EXISTING);
getLogger().info("Update Completed!");
getLogger().warning("-------------------------------");
Expand Down Expand Up @@ -162,7 +162,7 @@ public void onDisable() {
} else if (ServerType.equals("purpur")) {
URLConnection connection = null;
try {
connection = new URL("https://api.purpurmc.org/v2/purpur/1.19.3").openConnection();
connection = new URL("https://api.purpurmc.org/v2/purpur/1.19.4").openConnection();
} catch (IOException e) {
e.printStackTrace();
}
Expand Down Expand Up @@ -190,7 +190,7 @@ public void onDisable() {
if (version != latest) {
getLogger().warning("Version is NOT up to date! Newest PURPUR version is " + latest);
getLogger().info("Downloading update and applying to " + serverJarName + "...");
InputStream in = new URL("https://api.purpurmc.org/v2/purpur/1.19.3/latest/download").openStream();
InputStream in = new URL("https://api.purpurmc.org/v2/purpur/1.19.4/latest/download").openStream();
Files.copy(in, Paths.get(serverJarName), StandardCopyOption.REPLACE_EXISTING);
getLogger().info("Update Completed!");
getLogger().warning("-------------------------------");
Expand Down Expand Up @@ -229,9 +229,9 @@ public void onDisable() {
} else {
getLogger().warning("-------------------------------");
getLogger().warning("Amend");
getLogger().warning("ERROR: Your server version is older, to prevent accidental updates to the world, amend will shut down.");
getLogger().warning("Current Version: " + BukkitVersion.substring(11));
getLogger().warning("Plugin Version: " + "1.19.3");
getLogger().warning("ERROR: Your server version is older/newer, to prevent accidental updates to the world, amend will shut down.");
getLogger().warning("Current Version: " + BukkitVersion.substring(10));
getLogger().warning("Plugin Version: " + "1.19.4");
getLogger().warning("Closing plugin...");
getLogger().warning("-------------------------------");
//Time out so user sees the error message.
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# ┃╭━╮┃┃┃┃┃━┫┃┃┃╰╯┃
# ╰╯╱╰┻┻┻┻━━┻╯╰┻━━╯

# --WHEN EDITING THIS CONFIG WHILE THE SERVER IS ON, DO NOT WORRY AS THE CONFIG REFRESHES TO SEE THE CHANGES YOU MADE.--
# --WHEN EDITING THIS CONFIG WHILE THE SERVER IS ON, DO NOT WORRY!...THE CONFIG REFRESHES TO SEE THE CHANGES YOU MADE.--

# This changes the jar file name. PLEASE MAKE SURE IT MATCHES THE JAR FILE NAME OR ELSE IT WILL CREATE A NEW JAR FILE.
# Also make sure to include ".jar".
Expand Down

0 comments on commit 5036634

Please sign in to comment.