https://github.com/hsgamer/mcserverupdater
A program to update Minecraft server jar
https://github.com/hsgamer/mcserverupdater
airplane bukkit bungeecord fabric fabricmc minecraft minecraft-server paper papermc purpur spigot spigot-api sponge spongeforge spongepowered travertine velocity waterfall
Last synced: about 1 year ago
JSON representation
A program to update Minecraft server jar
- Host: GitHub
- URL: https://github.com/hsgamer/mcserverupdater
- Owner: HSGamer
- License: mit
- Created: 2021-11-29T14:37:33.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-03-16T03:14:19.000Z (about 1 year ago)
- Last Synced: 2025-03-16T03:23:18.687Z (about 1 year ago)
- Topics: airplane, bukkit, bungeecord, fabric, fabricmc, minecraft, minecraft-server, paper, papermc, purpur, spigot, spigot-api, sponge, spongeforge, spongepowered, travertine, velocity, waterfall
- Language: Java
- Homepage: https://www.spigotmc.org/resources/mcserverupdater.98003/
- Size: 257 KB
- Stars: 11
- Watchers: 1
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MCServerUpdater
> This is a simple program that will check for updates to Minecraft server jar and download them if they are available.
## Download
Download the latest version of MCServerUpdater
from [here](https://github.com/HSGamer/MCServerUpdater/releases)
## Arguments
```
Option Description
------ -----------
--help Get the list of arguments
--projects Get the list of projects
--output The output file path (default: server.jar)
--project The project to download (default: paper)
--version The project version (default: default)
```
## Examples
* List all available projects
* `java -jar MCServerUpdater.jar --projects`
* Download the latest build of Paper
* `java -jar MCServerUpdater.jar`
* `java -jar MCServerUpdater.jar --project paper`
* Download the latest build of Paper and save it to the file `server.jar`
* `java -jar MCServerUpdater.jar --output server.jar`
* `java -jar MCServerUpdater.jar --project paper --output server.jar`
* Download the latest build of Paper 1.17.1
* `java -jar MCServerUpdater.jar --project paper --version 1.17.1`
## Use this in your projects
1. Add this as a dependency
* Maven
```xml
codemc-repo
https://repo.codemc.io/repository/maven-public/
```
```xml
me.hsgamer
mc-server-updater-lib
VERSION
```
* Gradle
```groovy
repositories {
maven { url = "https://repo.codemc.io/repository/maven-public/" }
}
dependencies {
compileOnly(group: 'me.hsgamer', name: 'mc-server-updater-lib', version: 'VERSION')
}
```
2. Use the `UpdateBuilder` to create, execute the update process and get the result as `UpdateStatus`
```java
import java.util.concurrent.CompletableFuture;
class Main {
public static void main(String[] args) {
UpdateBuilder builder = UpdateBuilder.updateProject("paper")
.version("1.17.1")
.outputFile("server.jar");
// Execute the update process asynchronously
CompletableFuture future = builder.executeAsync();
// Execute the update process synchronously
UpdateStatus status = builder.execute();
}
}
```
3. Do whatever you want with the `UpdateStatus`
## Additional System Properties
| Name | Description | Default |
|----------------------------------|----------------------------------------------------------------------|---------|
| `MCServerUpdater.javaExecutable` | The Java executable to run external processes (Spigot Updater, etc.) | `java` |