3 Commits

Author SHA1 Message Date
44b9bcc960 Updates current version to 1.2.1
All checks were successful
KnarCraft/Minecraft-Server-Launcher/pipeline/head This commit looks good
2020-09-20 18:18:45 +02:00
9f2dda7c6b Updates Minecraft .jar version to 1.16.3 where applicable 2020-09-20 18:18:27 +02:00
6c0e352649 Fixes a bug caused by the version file not being properly closed 2020-09-20 17:36:10 +02:00
4 changed files with 10 additions and 11 deletions

View File

@ -48,7 +48,7 @@ public class ServerVersionContainer {
/**
* Resets the state of the server version container
*/
public void reset() {
void reset() {
this.vanillaVersion = null;
this.snapshotVersion = null;
this.bungeeVersion = null;
@ -92,7 +92,7 @@ public class ServerVersionContainer {
/**
* Tries to save the state of this server version container
*/
public void saveState() {
void saveState() {
File saveFile = new File(versionFile);
PrintWriter file;
try {
@ -116,12 +116,10 @@ public class ServerVersionContainer {
* Loads the object state from the save file
*/
private void loadState() {
BufferedReader reader;
if (!new File(versionFile).exists()) {
return;
}
try {
reader = new BufferedReader(new InputStreamReader(new FileInputStream(versionFile)));
try (BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(versionFile)))) {
String currentData = CommonFunctions.readBufferedReader(reader);
for (String line : currentData.split("\n")) {
parseSaveLine(line);

View File

@ -131,7 +131,7 @@ public final class CommonFunctions {
* @param destination <p>Target destination</p>
* @throws IOException <p>If we can't start a file stream</p>
*/
public static void copyFolder(GUI serverLauncherGui, File source, File destination) throws IOException {
private static void copyFolder(GUI serverLauncherGui, File source, File destination) throws IOException {
if (!source.isDirectory()) {
copyFile(serverLauncherGui, source, destination);
} else {
@ -200,6 +200,7 @@ public final class CommonFunctions {
while (reader.ready() && (line = reader.readLine()) != null) {
text.append(line).append("\n");
}
reader.close();
return text.toString().trim();
}

View File

@ -1,2 +1,2 @@
beta
1.2.0
1.2.1
1 beta
2 1.2.0 1.2.1

View File

@ -1,8 +1,8 @@
Vanilla;Latest,Snapshot,1.16.2,1.15.2,1.14.4,1.13.2,1.12.2,1.11.2,1.10.2,1.9.4,1.8.9,1.7.10,1.6.4,1.5.2,1.4.7,1.3.2,1.2.5;https://launchermeta.mojang.com/mc/game/version_manifest.json;"release":";";https://s3.amazonaws.com/Minecraft.Download/versions/
Spigot;1.16.2,1.16.1,1.15.2,1.14.4,1.13.2,1.12.2,1.11.2,1.10.2,1.9.4,1.9.4,1.8.8,1.7.10,1.6.4-R2.1,1.5.2-R1.1,1.4.7-R1.1;https://static.knarcraft.net/archive/downloads/minecraftserverjars/Spigot/;spigot-
Paper;1.16.1,1.15.2,1.14.4,1.13.2,1.12.2,1.11.2,1.10.2,1.9.4,1.8.8;https://static.knarcraft.net/archive/downloads/minecraftserverjars/Paper/;Paper-
Vanilla;Latest,Snapshot,1.16.3,1.15.2,1.14.4,1.13.2,1.12.2,1.11.2,1.10.2,1.9.4,1.8.9,1.7.10,1.6.4,1.5.2,1.4.7,1.3.2,1.2.5;https://launchermeta.mojang.com/mc/game/version_manifest.json;"release":";";https://s3.amazonaws.com/Minecraft.Download/versions/
Spigot;1.16.3,1.16.1,1.15.2,1.14.4,1.13.2,1.12.2,1.11.2,1.10.2,1.9.4,1.9.4,1.8.8,1.7.10,1.6.4-R2.1,1.5.2-R1.1,1.4.7-R1.1;https://static.knarcraft.net/archive/downloads/minecraftserverjars/Spigot/;spigot-
Paper;1.16.3,1.15.2,1.14.4,1.13.2,1.12.2,1.11.2,1.10.2,1.9.4,1.8.8;https://static.knarcraft.net/archive/downloads/minecraftserverjars/Paper/;Paper-
SpongeVanilla;1.12.2,1.11.2,1.10.2,1.8.9;https://dl-api.spongepowered.org/v1/org.spongepowered/spongevanilla/downloads?type=stable&minecraft=;"version":";",;https://repo.spongepowered.org/maven/org/spongepowered/spongevanilla/;/spongevanilla-
Craftbukkit;1.16.2,1.16.1,1.15.2,1.14.4,1.13.2,1.12.2,1.11.2,1.10.2,1.9.4,1.8.8,1.7.10-R0.1,1.6.4-R2.0,1.5.2-R1.0,1.4.6-R0.3,1.3.2-R3.0,1.2.5-R2.0,1.1-R6,1.0.1-R1,b1.8.1,b1.7.3;https://static.knarcraft.net/archive/downloads/minecraftserverjars/Bukkit/;craftbukkit-
Craftbukkit;1.16.3,1.15.2,1.14.4,1.13.2,1.12.2,1.11.2,1.10.2,1.9.4,1.8.8,1.7.10-R0.1,1.6.4-R2.0,1.5.2-R1.0,1.4.6-R0.3,1.3.2-R3.0,1.2.5-R2.0,1.1-R6,1.0.1-R1,b1.8.1,b1.7.3;https://static.knarcraft.net/archive/downloads/minecraftserverjars/Bukkit/;craftbukkit-
SpongeForge;1.12.2,1.11.2,1.10.2;https://dl-api.spongepowered.org/v1/org.spongepowered/spongeforge/downloads?type=stable&minecraft=;"version":";",;https://repo.spongepowered.org/maven/org/spongepowered/spongeforge/;/spongeforge-
MCPCplus;1.6.4,1.6.2,1.5.2,1.4.7;https://static.knarcraft.net/archive/downloads/minecraftserverjars/MCPC+/;mcpcplus
Bungee;Latest,1.7.10,1.6.4,1.5.2,1.4.7;https://ci.md-5.net/job/BungeeCord/lastSuccessfulBuild/artifact/bootstrap/target/;Artifacts of BungeeCord #; ;http://ci.md-5.net/job/BungeeCord/lastSuccessfulBuild/artifact/bootstrap/target/BungeeCord.jar;https://static.knarcraft.net/archive/downloads/minecraftserverjars/BungeeCord/;BungeeCord-

Can't render this file because it contains an unexpected character in line 1 and column 193.