Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz

ARG MC_HELPER_VERSION=1.41.2
ARG MC_HELPER_VERSION=1.41.5
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
# used for cache busting local copy of mc-image-helper
ARG MC_HELPER_REV=1
Expand Down
28 changes: 25 additions & 3 deletions docs/mods-and-plugins/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ On the left, there are sections describing some download automation options.

## Mods vs Plugins

The terms "mods" and "plugins" can be quite confusing. Generally, the rule of thumb is that "mods" are used by the types that run client side to modify rendering, add new blocks, and add behaviors server, such as [Forge](../types-and-platforms/server-types/forge.md) and [Fabric](../types-and-platforms/server-types/fabric.md). "Plugins" are used by the types that **only run on servers** to add behaviors, commands, etc such as [Paper](../types-and-platforms/server-types/paper.md) (which derives from [Bukkit/Spigot](../types-and-platforms/server-types/bukkit-spigot.md)). There are also some types that are [hybrids](../types-and-platforms/server-types/hybrids.md), such as Magma, that use both "mods" and "plugins"
The terms "mods" and "plugins" can be quite confusing. Generally, the rule of thumb is that "mods" are used by the types that run client side to modify rendering, add new blocks, and add behaviors server, such as [Forge](../types-and-platforms/server-types/forge.md) and [Fabric](../types-and-platforms/server-types/fabric.md). "Plugins" are used by the types that **only run on servers** to add behaviors, commands, etc such as [Paper](../types-and-platforms/server-types/paper.md) (which derives from [Bukkit/Spigot](../types-and-platforms/server-types/bukkit-spigot.md)). There are also some types that are [hybrids](../types-and-platforms/server-types/hybrids.md), such as Magma, that use both "mods" and "plugins".

Typically, mods needs to be installed in both the client and server; however, there are some cases when only the server needs a mod. Plugins only need to be installed in the server and are never needed in the client.

## Optional plugins, mods, and config attach points

Expand All @@ -41,8 +43,28 @@ For example: `-e REMOVE_OLD_MODS=TRUE -e REMOVE_OLD_MODS_INCLUDE="*.jar" -e REMO

These paths work well if you want to have a common set of modules in a separate location, but still have multiple worlds with different server requirements in either persistent volumes or a downloadable archive.

!!! information ""
For more flexibility with mods/plugins preparation, you can declare other directories, files, and URLs to use in [the `MODS` / `PLUGINS` variables](#modsplugins-list).
!!! information "Multiple source directories"

`COPY_PLUGINS_SRC`, `COPY_MODS_SRC`, `COPY_CONFIG_SRC` can each be set to a comma or newline delimited list of container directories to reference.

For example, in a compose file:

```yaml
environment:
# ...EULA, etc
TYPE: PAPER
# matches up to volumes declared below
COPY_PLUGINS_SRC: /plugins-common,/plugins-local
volumes:
- mc-data:/data
# For example, reference a shared directory used by several projects
- ../plugins-common:/plugins-common:ro
# and add plugins unique to this project
- ./plugins:/plugins-local:ro
```

Alternatively, you can declare other directories along with files and URLs to use in [the `MODS` / `PLUGINS` variables](#modsplugins-list).



## Zip file modpack
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
services:
mc:
image: itzg/minecraft-server
container_name: paper
tty: true
stdin_open: true
environment:
EULA: "true"
TYPE: PAPER
VIEW_DISTANCE: 10
MEMORY: 2G
ports:
- "25565:25565"
volumes:
- mc-paper:/data
- mc-data:/data
restart: unless-stopped
volumes:
mc-paper: {}
mc-data: {}
10 changes: 4 additions & 6 deletions scripts/start-setupMounts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function mc-image-helper-mounts(){
: "${COPY_PLUGINS_SRC:="/plugins"}"
: "${COPY_PLUGINS_DEST:=${PLUGINS_OUT_DIR}}"

if usesPlugins && [ -d "${COPY_PLUGINS_SRC}" ]; then
if usesPlugins; then
mkdir -p "${COPY_PLUGINS_DEST}"
log "Copying any plugins from ${COPY_PLUGINS_SRC} to ${COPY_PLUGINS_DEST}"
mc-image-helper-mounts "${COPY_PLUGINS_SRC}" "${COPY_PLUGINS_DEST}"
Expand All @@ -47,17 +47,15 @@ fi
: "${COPY_MODS_SRC:="/mods"}"
: "${COPY_MODS_DEST:=${MODS_OUT_DIR}}"

if usesMods && [ -d "${COPY_MODS_SRC}" ]; then
if usesMods; then
log "Copying any mods from ${COPY_MODS_SRC} to ${COPY_MODS_DEST}"
mc-image-helper-mounts "${COPY_MODS_SRC}" "${COPY_MODS_DEST}"
fi

: "${COPY_CONFIG_SRC:="/config"}"
: "${COPY_CONFIG_DEST:="/data/config"}"

if [ -d "${COPY_CONFIG_SRC}" ]; then
log "Copying any configs from ${COPY_CONFIG_SRC} to ${COPY_CONFIG_DEST}"
mc-image-helper-mounts "${COPY_CONFIG_SRC}" "${COPY_CONFIG_DEST}"
fi
log "Copying any configs from ${COPY_CONFIG_SRC} to ${COPY_CONFIG_DEST}"
mc-image-helper-mounts "${COPY_CONFIG_SRC}" "${COPY_CONFIG_DEST}"

exec "${SCRIPTS:-/}start-setupServerProperties" "$@"