mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-17 07:03:57 +00:00
@@ -9,7 +9,7 @@ handleDebugMode
|
||||
: "${SPIGET_RESOURCES:=}"
|
||||
: "${SPIGET_DOWNLOAD_TOLERANCE:=5}" # in minutes
|
||||
|
||||
acceptArgs=(--accept application/zip --accept application/java-archive)
|
||||
acceptArgs=(--accept application/zip --accept application/java-archive --accept application/octet-stream)
|
||||
|
||||
containsJars() {
|
||||
file=${1?}
|
||||
@@ -20,7 +20,7 @@ containsJars() {
|
||||
if [[ $line =~ $pat ]]; then
|
||||
return 0
|
||||
fi
|
||||
done < <(unzip -l "$file")
|
||||
done < <(unzip -l "$file" | tail -n +4)
|
||||
|
||||
return 1
|
||||
}
|
||||
@@ -34,7 +34,7 @@ containsPlugin() {
|
||||
if [[ $line =~ $pat ]]; then
|
||||
return 0
|
||||
fi
|
||||
done < <(unzip -l "$file")
|
||||
done < <(unzip -l "$file" | tail -n +4)
|
||||
|
||||
return 1
|
||||
}
|
||||
@@ -101,11 +101,11 @@ downloadResourceFromSpiget() {
|
||||
log "ERROR: failed to retrieve file type of resource $resource"
|
||||
exit 1
|
||||
fi
|
||||
if [[ $fileType == .zip ]]; then
|
||||
if containsJars "${outfile}"; then
|
||||
log "Extracting contents of resource ${resource} into plugins"
|
||||
extract "$outfile" /data/plugins
|
||||
rm "$outfile"
|
||||
elif [[ $fileType == .jar ]]; then
|
||||
elif containsPlugin "${outfile}"; then
|
||||
log "Moving resource ${resource} into plugins"
|
||||
mv "$outfile" /data/plugins
|
||||
else
|
||||
|
||||
@@ -8,6 +8,6 @@ services:
|
||||
EULA: "TRUE"
|
||||
SETUP_ONLY: "TRUE"
|
||||
TYPE: PAPER
|
||||
SPIGET_RESOURCES: "34315,3836,6245"
|
||||
SPIGET_RESOURCES: "34315,3836,6245,2124"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
mc-image-helper assert fileExists plugins/3836.jar
|
||||
mc-image-helper assert fileExists plugins/34315.jar
|
||||
mc-image-helper assert fileExists plugins/6245.jar
|
||||
mc-image-helper assert fileExists plugins/6245.jar
|
||||
mc-image-helper assert fileExists plugins/SkinsRestorer.jar
|
||||
Reference in New Issue
Block a user