Added USES_PLUGINS to allows /plugins use with hybrid mods (#3320)

This commit is contained in:
Geoff Bourne
2025-02-17 11:11:53 -06:00
committed by GitHub
parent 3a678a6bf3
commit dcdbb85936
3 changed files with 43 additions and 11 deletions

View File

@@ -23,7 +23,7 @@ The terms "mods" and "plugins" can be quite confusing. Generally, the rule of th
There are optional volume paths that can be attached to supply content to be copied into the data area:
`/plugins`
: content in this directory is synchronized into `/data/plugins` for server types that use plugins, [as described above](#mods-vs-plugins). For special cases, the source can be changed by setting `COPY_PLUGINS_SRC` and destination by setting `COPY_PLUGINS_DEST`.
: content in this directory is synchronized into `/data/plugins` for server types that use plugins, [as described above](#mods-vs-plugins). For special cases, the source can be changed by setting `COPY_PLUGINS_SRC` and destination by setting `COPY_PLUGINS_DEST`. If using a mod-based loader, such as Forge or Fabric, but a hybrid mod like [Cardboard](https://modrinth.com/mod/cardboard), then set `USES_PLUGINS` to have the automation utilize `/plugins` mount.
`/mods`
: content in this directory is synchronized into `/data/mods` for server types that use mods, [as described above](#mods-vs-plugins). For special cases, the source can be changed by setting `COPY_MODS_SRC` and destination by setting `COPY_MODS_DEST`.

View File

@@ -0,0 +1,20 @@
services:
mc:
image: itzg/minecraft-server:latest
tty: true
stdin_open: true
ports:
- "25565:25565"
environment:
EULA: "TRUE"
TYPE: "FABRIC"
MEMORY: 4G
MODRINTH_PROJECTS: |
fabric-api
cardboard:beta
USES_PLUGINS: true
volumes:
- mc-data:/data
- ./plugins:/plugins:ro
volumes:
mc-data:

View File

@@ -464,21 +464,33 @@ function checkSum() {
}
function usesMods() {
case "$FAMILY" in
FORGE | FABRIC | HYBRID | SPONGE)
if isTrue "${USES_MODS:-}"; then
return 0
;;
esac
return 1
else
case "$FAMILY" in
FORGE | FABRIC | HYBRID | SPONGE)
return 0
;;
esac
return 1
fi
}
function usesPlugins() {
case "$FAMILY" in
SPIGOT | HYBRID)
if isTrue "${USES_PLUGINS:-}"; then
return 0
;;
esac
return 1
else
case "$FAMILY" in
SPIGOT | HYBRID)
return 0
;;
esac
return 1
fi
}
function resolveVersion() {