Fix NullPointer exception when server stop (ctx is null when BackupHelper.create is called by net.szum123321.textile_backup.mixin.MinecraftServerMixin#onShutdown)

Fix ClassNotFoundException exception for IOUtils class by adding dependency to org.apache.commons:commons-compress:1.8.1
This commit is contained in:
pm709 2020-01-29 10:03:28 +01:00
parent 83503307c8
commit 7d0bbaf930
2 changed files with 5 additions and 1 deletions

View File

@ -32,6 +32,7 @@ dependencies {
include "io.github.cottonmc:Jankson-Fabric:2.0.0+j1.2.0"
include "io.github.cottonmc.cotton:cotton-logging:1.0.0-rc.4"
include "io.github.cottonmc.cotton:cotton-config:1.0.0-rc.7"
include "org.apache.commons:commons-compress:1.8.1"
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
// You may need to force-disable transitiveness on them.

View File

@ -43,7 +43,10 @@ public class BackupHelper {
StringBuilder builder = new StringBuilder();
builder.append("Backup started by: ");
builder.append(ctx.getName());
if( ctx != null )
builder.append(ctx.getName());
else
builder.append("SERVER");
builder.append(" on: ");
builder.append(getDateTimeFormatter().format(now));