Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ Examples:
}
```

### Other command line arguments
* `--noGui` or `noGui` arguments don't open the gui on supported systems
* `--force` or `force` arguments forcefully run the modpack setup/update, even when the modpack version stays the same between runs, usally usefull in local modpack development environments

## Securing folders/files from overriding.
If you use mrpack4server 0.5.0 or newer, you can now create a `lockedpaths.txt` file in your main server directory.
It will then be used to select which paths are blocked from getting updates/being overwritten.
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/eu/pb4/mrpackserver/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ public static void main(String[] args) throws Throwable {
System.setProperty("log4j2.formatMsgNoLookups", "true");

boolean noGui = false;
boolean force = false;
for (var arg : args) {
if (arg.equals("nogui") || arg.equals("--nogui")) {
noGui = true;
break;
}
if (arg.equals("force") || arg.equals("--force")) {
force = true;
}
}

Expand Down Expand Up @@ -82,7 +85,7 @@ public static void main(String[] args) throws Throwable {
}
}

if (runLogic && (!modpackInfo.projectId.equals(instanceInfo.projectId) || !modpackInfo.versionId.equals(instanceInfo.versionId) || instanceInfo.runnablePath.isEmpty())) {
if (runLogic && (!modpackInfo.projectId.equals(instanceInfo.projectId) || !modpackInfo.versionId.equals(instanceInfo.versionId) || instanceInfo.runnablePath.isEmpty() || force)) {
Files.createDirectories(instanceData);
var newInstance = Utils.checkAndSetupModpack(modpackInfo, instanceInfo, runPath, instanceData);
if (newInstance != null) {
Expand Down