Added support for skript resources via SPIGET_RESOURCES (#2764)
This commit is contained in:
parent
cec8027844
commit
665ca9c61a
|
@ -0,0 +1,10 @@
|
||||||
|
services:
|
||||||
|
mc:
|
||||||
|
image: itzg/minecraft-server
|
||||||
|
environment:
|
||||||
|
EULA: true
|
||||||
|
TYPE: PAPER
|
||||||
|
PLUGINS: https://github.com/SkriptLang/Skript/releases/download/2.8.4/Skript.jar
|
||||||
|
SPIGET_RESOURCES: 103749
|
||||||
|
ports:
|
||||||
|
- "25565:25565"
|
|
@ -108,15 +108,20 @@ downloadResourceFromSpiget() {
|
||||||
log "ERROR: failed to retrieve file type of resource $resource"
|
log "ERROR: failed to retrieve file type of resource $resource"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if containsPlugin "${outfile}"; then
|
if [[ $fileType = .sk ]]; then
|
||||||
log "Moving resource ${resource} into plugins"
|
mkdir -p /data/plugins/Skript/scripts
|
||||||
mv "$outfile" /data/plugins
|
mv "$outfile" /data/plugins/Skript/scripts
|
||||||
elif containsJars "${outfile}"; then
|
|
||||||
log "Extracting contents of resource ${resource} into plugins"
|
|
||||||
extract "$outfile" /data/plugins
|
|
||||||
else
|
else
|
||||||
log "ERROR: file for resource ${resource} has an unexpected file type: ${fileType}"
|
if containsPlugin "${outfile}"; then
|
||||||
exit 2
|
log "Moving resource ${resource} into plugins"
|
||||||
|
mv "$outfile" /data/plugins
|
||||||
|
elif containsJars "${outfile}"; then
|
||||||
|
log "Extracting contents of resource ${resource} into plugins"
|
||||||
|
extract "$outfile" /data/plugins
|
||||||
|
else
|
||||||
|
log "ERROR: file for resource ${resource} has an unexpected file type: ${fileType}"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
rm -rf "$tempDir"
|
rm -rf "$tempDir"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue