Skip to content

Commit 93b4431

Browse files
committed
v12.2.0 Release cleanup
1 parent f90d4e3 commit 93b4431

File tree

8 files changed

+139
-114
lines changed

8 files changed

+139
-114
lines changed

README.md

Lines changed: 113 additions & 84 deletions
Large diffs are not rendered by default.

pom.xml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,16 @@
8585
</goals>
8686
<configuration>
8787
<target>
88-
<copy file="${project.build.directory}/${project.build.finalName}.jar" todir="C:/Plugins Testing/Bungeecord/plugins"/>
89-
<copy file="${project.build.directory}/${project.build.finalName}.jar" todir="C:/Plugins Testing/Folia/plugins"/>
90-
<copy file="${project.build.directory}/${project.build.finalName}.jar" todir="C:/Plugins Testing/Paper/plugins"/>
91-
<copy file="${project.build.directory}/${project.build.finalName}.jar" todir="C:/Plugins Testing/Spigot/plugins"/>
92-
<copy file="${project.build.directory}/${project.build.finalName}.jar" todir="C:/Plugins Testing/Velocity/plugins"/>
88+
<copy file="${project.build.directory}/${project.build.finalName}.jar"
89+
todir="C:/Plugins Testing/Bungeecord/plugins"/>
90+
<copy file="${project.build.directory}/${project.build.finalName}.jar"
91+
todir="C:/Plugins Testing/Folia/plugins"/>
92+
<copy file="${project.build.directory}/${project.build.finalName}.jar"
93+
todir="C:/Plugins Testing/Paper/plugins"/>
94+
<copy file="${project.build.directory}/${project.build.finalName}.jar"
95+
todir="C:/Plugins Testing/Spigot/plugins"/>
96+
<copy file="${project.build.directory}/${project.build.finalName}.jar"
97+
todir="C:/Plugins Testing/Velocity/plugins"/>
9398
</target>
9499
</configuration>
95100
</execution>

src/main/java/bungeecord/BungeeUpdate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ private void scheduleRestart() {
139139
String message = formatRestartMessage(UpdateOptions.restartMessage, delaySec);
140140
if (message != null && !message.isEmpty()) {
141141
getProxy().getScheduler().schedule(this, () ->
142-
ProxyServer.getInstance().broadcast(net.md_5.bungee.api.chat.TextComponent.fromLegacyText(ChatColor.translateAlternateColorCodes('&', message))),
142+
ProxyServer.getInstance().broadcast(net.md_5.bungee.api.chat.TextComponent.fromLegacyText(ChatColor.translateAlternateColorCodes('&', message))),
143143
0L, TimeUnit.SECONDS);
144144
}
145145
getProxy().getScheduler().schedule(this, () -> {

src/main/java/common/PluginDownloader.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import java.net.URL;
2222
import java.nio.charset.StandardCharsets;
2323
import java.nio.file.*;
24-
import java.nio.file.InvalidPathException;
2524
import java.nio.file.attribute.BasicFileAttributes;
2625
import java.security.DigestInputStream;
2726
import java.security.MessageDigest;
@@ -290,7 +289,7 @@ private boolean downloadWithUrlConnection(String link, String githubToken, boole
290289
return false;
291290
}
292291
if (!downloadWithVerification(rawTmp, connection)) {
293-
logger.warning("Download failed (attempt " + attempt + ") retrying lenient mode (old-plugin behavior)");
292+
logger.warning("Download failed (attempt " + attempt + ") - retrying lenient mode (old-plugin behavior)");
294293
try {
295294
connection = openConnection(link, githubToken, requiresAuth);
296295
return downloadLenient(rawTmp, connection);

src/main/java/common/PluginUpdater.java

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.fasterxml.jackson.databind.JsonNode;
44
import com.fasterxml.jackson.databind.ObjectMapper;
55
import com.fasterxml.jackson.databind.node.ArrayNode;
6-
import com.fasterxml.jackson.databind.node.ObjectNode;
76
import org.jetbrains.annotations.NotNull;
87
import org.jsoup.Connection;
98
import org.jsoup.Jsoup;
@@ -24,16 +23,10 @@
2423
import java.net.URLEncoder;
2524
import java.nio.charset.Charset;
2625
import java.nio.charset.StandardCharsets;
27-
import java.nio.file.DirectoryStream;
28-
import java.nio.file.FileSystemException;
29-
import java.nio.file.Files;
30-
import java.nio.file.InvalidPathException;
31-
import java.nio.file.Path;
32-
import java.nio.file.Paths;
33-
import java.nio.file.StandardCopyOption;
34-
import java.time.Instant;
26+
import java.nio.file.*;
3527
import java.security.SecureRandom;
3628
import java.security.cert.X509Certificate;
29+
import java.time.Instant;
3730
import java.util.*;
3831
import java.util.concurrent.*;
3932
import java.util.concurrent.atomic.AtomicBoolean;
@@ -1424,7 +1417,7 @@ private static JsonNode pickBestFallback(
14241417
want.add("waterfall");
14251418
}
14261419

1427-
String[] avoidMods = new String[] { "fabric", "quilt", "forge", "neoforge", ".mrpack" };
1420+
String[] avoidMods = new String[]{"fabric", "quilt", "forge", "neoforge", ".mrpack"};
14281421

14291422
JsonNode chosen = null;
14301423
int bestFileScore = Integer.MIN_VALUE;
@@ -1946,9 +1939,9 @@ private boolean handleGitHubDownload(String platform, String key, Map.Entry<Stri
19461939
if (downloadUrl == null || downloadUrl.isEmpty()) {
19471940
if (UpdateOptions.debug) {
19481941
if (UpdateOptions.autoCompileEnable && UpdateOptions.autoCompileWhenNoJarAsset) {
1949-
logger.info("[DEBUG] No GitHub .jar asset found for " + repoPath + " attempting source build.");
1942+
logger.info("[DEBUG] No GitHub .jar asset found for " + repoPath + " - attempting source build.");
19501943
} else {
1951-
logger.info("[DEBUG] No GitHub .jar asset found for " + repoPath + " source build disabled.");
1944+
logger.info("[DEBUG] No GitHub .jar asset found for " + repoPath + " - source build disabled.");
19521945
}
19531946
}
19541947
return attemptSourceBuild(repoPath, entry, value, key, true, forceBuild);
@@ -1963,7 +1956,7 @@ private boolean handleGitHubDownload(String platform, String key, Map.Entry<Stri
19631956
if (UpdateOptions.autoCompileEnable) {
19641957
logger.info("[DEBUG] GitHub asset download failed, falling back to source build for " + repoPath);
19651958
} else {
1966-
logger.info("[DEBUG] GitHub asset download failed for " + repoPath + " auto-compile disabled.");
1959+
logger.info("[DEBUG] GitHub asset download failed for " + repoPath + " - auto-compile disabled.");
19671960
}
19681961
}
19691962
return attemptSourceBuild(repoPath, entry, value, key, false, forceBuild);
@@ -1974,10 +1967,10 @@ private boolean handleGitHubDownload(String platform, String key, Map.Entry<Stri
19741967
if (UpdateOptions.debug) {
19751968
if (UpdateOptions.autoCompileEnable) {
19761969
logger.info("[DEBUG] GitHub asset download threw " + t.getClass().getSimpleName()
1977-
+ " falling back to source build for " + repoPath);
1970+
+ " - falling back to source build for " + repoPath);
19781971
} else {
19791972
logger.info("[DEBUG] GitHub asset download threw " + t.getClass().getSimpleName()
1980-
+ " for " + repoPath + " auto-compile disabled.");
1973+
+ " for " + repoPath + " - auto-compile disabled.");
19811974
}
19821975
}
19831976
return attemptSourceBuild(repoPath, entry, value, key, false, forceBuild);
@@ -1987,10 +1980,10 @@ private boolean handleGitHubDownload(String platform, String key, Map.Entry<Stri
19871980
if (UpdateOptions.debug) {
19881981
if (UpdateOptions.autoCompileEnable) {
19891982
logger.info("[DEBUG] handleGitHubDownload failed for " + value + " : " + t.getMessage()
1990-
+ " building from source as fallback.");
1983+
+ " - building from source as fallback.");
19911984
} else {
19921985
logger.info("[DEBUG] handleGitHubDownload failed for " + value + " : " + t.getMessage()
1993-
+ " auto-compile disabled.");
1986+
+ " - auto-compile disabled.");
19941987
}
19951988
}
19961989
return attemptSourceBuild(repoPath, entry, value, key, false, forceBuild);

src/main/java/common/RollbackManager.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import com.fasterxml.jackson.databind.ObjectMapper;
55

66
import java.io.IOException;
7-
import java.nio.charset.StandardCharsets;
87
import java.nio.file.*;
98
import java.time.Instant;
109
import java.time.ZoneOffset;

src/main/java/velocity/VelocityUpdate.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,9 @@ private void scheduleVelocityRestart() {
206206
if (message != null && !message.isEmpty()) {
207207
Component component = LegacyComponentSerializer.legacyAmpersand().deserialize(message);
208208
proxy.getScheduler().buildTask(this, () ->
209-
proxy.getAllPlayers().forEach(player -> player.sendMessage(component)))
210-
.delay(Duration.ZERO)
211-
.schedule();
209+
proxy.getAllPlayers().forEach(player -> player.sendMessage(component)))
210+
.delay(Duration.ZERO)
211+
.schedule();
212212
}
213213
proxy.getScheduler().buildTask(this, () -> {
214214
if (!UpdateOptions.restartAfterUpdate) {

src/main/resources/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
################################################################################
2-
# AutoUpdatePlugins Main Configuration
2+
# AutoUpdatePlugins - Main Configuration
33
################################################################################
44

55
updates:

0 commit comments

Comments
 (0)