Skip to content

Commit

Permalink
Update AutoUpdate.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Pan-cakse committed Sep 19, 2023
1 parent cb47355 commit 7cb0172
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions java17/src/main/java/top/leavesmc/leavesclip/AutoUpdate.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package top.leavesmc.leavesclip;
package org.netherite.netheriteclip;

import java.io.*;
import java.util.Arrays;
Expand Down Expand Up @@ -44,7 +44,7 @@ public static void init() {
return;
}

System.out.println("Using server core: " + autoUpdateCorePath + " provide by Leavesclip-Auto-Update");
System.out.println("Using server core: " + autoUpdateCorePath + " provide by Netheriteclip-Auto-Update");
} catch (IOException e) {
e.printStackTrace();
}
Expand All @@ -53,7 +53,7 @@ public static void init() {
private static boolean detectionLeavesclipVersion(String jarPath) {
byte[] localBytes;

try (InputStream localStream = AutoUpdate.class.getResourceAsStream("/META-INF/leavesclip-version")) {
try (InputStream localStream = AutoUpdate.class.getResourceAsStream("/META-INF/netheriteclip-version")) {
if (localStream != null) {
localBytes = localStream.readAllBytes();
} else {
Expand All @@ -63,7 +63,7 @@ private static boolean detectionLeavesclipVersion(String jarPath) {
throw new RuntimeException(e);
}

try (InputStream externalStream = getResourceAsStream(jarPath, "/META-INF/leavesclip-version")) {
try (InputStream externalStream = getResourceAsStream(jarPath, "/META-INF/netheriteclip-version")) {
if (externalStream != null) {
return Arrays.equals(localBytes, externalStream.readAllBytes());
}
Expand Down

0 comments on commit 7cb0172

Please sign in to comment.