Skip to content

Commit

Permalink
1.7.8
Browse files Browse the repository at this point in the history
Updated to 1.21.1 upstreams
  • Loading branch information
MrTronMan committed Aug 11, 2024
1 parent b5ddaa5 commit 7802c50
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Currently as of now you can download it on our new website @ [amend.mrtron.dev/d

# Windows
**Windows is NOT fully supported**, this is because of the way Windows handles files compared to Linux. If you would like to use this on Windows, **the only support Amend has is through Crafty's Executable URL**.
You can place `https://api.tronmc.com/amend/versions/(SERVER TYPE HERE)/1.21/download/` into the executable URL and click **`Update Executable`** to download the latest version of the server jar.
You can place `https://api.tronmc.com/amend/versions/(SERVER TYPE HERE)/1.21.1/download/` into the executable URL and click **`Update Executable`** to download the latest version of the server jar.

![](https://cdn.tronmc.com/img/git/crafty_update.png)

Expand Down Expand Up @@ -43,7 +43,7 @@ server-type: "paper"
# Config Version. Like every spigot dev, we ask that you DO NOT CHANGE THIS PLEASE.
config-version: 8
```
- Then place the (plugin) jar in and it will automatically update it to the newest version, ***please note as of now the plugin is updating the latest `1.21` builds and will continue to update until a new release comes out, then you will need to come back here to get the newest plugin update.***
- Then place the (plugin) jar in and it will automatically update it to the newest version, ***please note as of now the plugin is updating the latest `1.21.1` builds and will continue to update until a new release comes out, then you will need to come back here to get the newest plugin update.***

Update checks for the plugin are currently unavailable to switch off, but we only create the update notification if its a critical update, not a fancy one.
###### © 2024 mrtron.dev. All Rights Reserved.
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.7.7--V.1.21</version>
<version>1.7.8--V.1.21.1</version>
<packaging>jar</packaging>
<name>Amend</name>

Expand Down
14 changes: 7 additions & 7 deletions src/main/java/com/tronmc/beta/amend/Amend.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void onEnable() {
}

//Update Checker that checks our API for the latest using a handy dependency called SpigotUpdateChecker.
new UpdateChecker(this, UpdateCheckSource.CUSTOM_URL, "https://api.tronmc.com/amend/versions/1.21") // A link to a URL that contains the latest version as String
new UpdateChecker(this, UpdateCheckSource.CUSTOM_URL, "https://api.tronmc.com/amend/versions/1.21.1") // A link to a URL that contains the latest version as String
.setDownloadLink("https://amend.mrtron.dev/download") // You can either use a custom URL or the Spigot Resource ID
.setNotifyOpsOnJoin(false) // Notify OPs on Join when a new version is found (default)
.checkNow(); // And check right now
Expand All @@ -92,7 +92,7 @@ public void onDisable() {
getLogger().info("Started Update Check...");

//Plugin Version
String pluginVersion = "1.21";
String pluginVersion = "1.21.1";

//Changes the Bukkit Version to a string and then gets the jar version and the MC version.
String BukkitVersion = Bukkit.getVersion().toString();
Expand All @@ -111,12 +111,12 @@ public void onDisable() {
String ServerType = getConfig().getString("server-type");
//Boolean ForcedUpdate = this.getConfig().getBoolean("force-update");

if (MCVersion.equals("1.21")) {
if (MCVersion.equals("1.21.1")) {

if (ServerType.equals("paper")) {
URLConnection connection = null;
try {
connection = new URL("https://api.tronmc.com/amend/versions/paper/1.21").openConnection();
connection = new URL("https://api.tronmc.com/amend/versions/paper/1.21.1").openConnection();
} catch (IOException e) {
e.printStackTrace();
}
Expand All @@ -139,7 +139,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.tronmc.com/amend/versions/paper/1.21/download/direct").openStream();
InputStream in = new URL("https://api.tronmc.com/amend/versions/paper/1.21.1/download/direct").openStream();
Files.copy(in, Paths.get(serverJarName), StandardCopyOption.REPLACE_EXISTING);
getLogger().info("Update Completed!");
getLogger().warning("-------------------------------");
Expand Down Expand Up @@ -167,7 +167,7 @@ public void onDisable() {
} else if (ServerType.equals("purpur")) {
URLConnection connection = null;
try {
connection = new URL("https://api.tronmc.com/amend/versions/purpur/1.21").openConnection();
connection = new URL("https://api.tronmc.com/amend/versions/purpur/1.21.1").openConnection();
} catch (IOException e) {
e.printStackTrace();
}
Expand All @@ -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.tronmc.com/amend/versions/purpur/1.21/download/direct").openStream();
InputStream in = new URL("https://api.tronmc.com/amend/versions/purpur/1.21.1/download/direct").openStream();
Files.copy(in, Paths.get(serverJarName), StandardCopyOption.REPLACE_EXISTING);
getLogger().info("Update Completed!");
getLogger().warning("-------------------------------");
Expand Down

0 comments on commit 7802c50

Please sign in to comment.