mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-10-05 20:10:29 +00:00
Fixed /plugins support for Paper servers
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
FROM itzg/minecraft-server
|
||||||
|
|
||||||
|
ENV TYPE=PAPER
|
||||||
|
|
||||||
|
COPY plugins/*.jar /plugins/
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
version: '3.7'
|
||||||
|
|
||||||
|
services:
|
||||||
|
mc:
|
||||||
|
build: .
|
||||||
|
environment:
|
||||||
|
EULA: "TRUE"
|
||||||
|
ports:
|
||||||
|
- 25565:25565
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
*.jar
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Download Bukkit/Spigot plugin jars, such as [WorldEdit](https://dev.bukkit.org/projects/worldedit/files) and place them here. At image build time the `COPY` step will place those jars in `/plugins`. At container startup, the contents of `/plugins` are sync'ed into `/data/plugins` for use with Bukkit/Spigot/Paper server types.
|
||||||
@@ -64,15 +64,17 @@ do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
mkdir -p /data/plugins
|
case ${TYPE} in
|
||||||
if [ "$TYPE" = "SPIGOT" ]; then
|
SPIGOT|BUKKIT|PAPER)
|
||||||
if [ -d /plugins ]; then
|
mkdir -p /data/plugins
|
||||||
log "Copying any Bukkit plugins over..."
|
if [ -d /plugins ]; then
|
||||||
# Copy plugins over using rsync to allow deeply nested updates of plugins
|
log "Copying plugins over..."
|
||||||
# only updates files if the source file is newer and print updated files
|
# Copy plugins over using rsync to allow deeply nested updates of plugins
|
||||||
rsync -a --out-format="update:%f:Last Modified %M" --prune-empty-dirs --update /plugins /data
|
# only updates files if the source file is newer and print updated files
|
||||||
fi
|
rsync -a --out-format="update:%f:Last Modified %M" --prune-empty-dirs --update /plugins /data
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
EXTRA_ARGS=""
|
EXTRA_ARGS=""
|
||||||
# Optional disable console
|
# Optional disable console
|
||||||
|
|||||||
Reference in New Issue
Block a user