mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-11-10 06:14:14 +00:00
Added support for skript resources via SPIGET_RESOURCES (#2764)
This commit is contained in:
parent
cec8027844
commit
665ca9c61a
2 changed files with 23 additions and 8 deletions
10
examples/skript/docker-compose.yml
Normal file
10
examples/skript/docker-compose.yml
Normal file
|
@ -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,6 +108,10 @@ downloadResourceFromSpiget() {
|
|||
log "ERROR: failed to retrieve file type of resource $resource"
|
||||
exit 1
|
||||
fi
|
||||
if [[ $fileType = .sk ]]; then
|
||||
mkdir -p /data/plugins/Skript/scripts
|
||||
mv "$outfile" /data/plugins/Skript/scripts
|
||||
else
|
||||
if containsPlugin "${outfile}"; then
|
||||
log "Moving resource ${resource} into plugins"
|
||||
mv "$outfile" /data/plugins
|
||||
|
@ -118,6 +122,7 @@ downloadResourceFromSpiget() {
|
|||
log "ERROR: file for resource ${resource} has an unexpected file type: ${fileType}"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
rm -rf "$tempDir"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue