Skip to content

Commit dcdbb85

Browse files
authored
Added USES_PLUGINS to allows /plugins use with hybrid mods (#3320)
1 parent 3a678a6 commit dcdbb85

File tree

3 files changed

+43
-11
lines changed

3 files changed

+43
-11
lines changed

docs/mods-and-plugins/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The terms "mods" and "plugins" can be quite confusing. Generally, the rule of th
2323
There are optional volume paths that can be attached to supply content to be copied into the data area:
2424

2525
`/plugins`
26-
: 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`.
26+
: 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.
2727

2828
`/mods`
2929
: 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`.

examples/fabric-cardboard/compose.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
services:
2+
mc:
3+
image: itzg/minecraft-server:latest
4+
tty: true
5+
stdin_open: true
6+
ports:
7+
- "25565:25565"
8+
environment:
9+
EULA: "TRUE"
10+
TYPE: "FABRIC"
11+
MEMORY: 4G
12+
MODRINTH_PROJECTS: |
13+
fabric-api
14+
cardboard:beta
15+
USES_PLUGINS: true
16+
volumes:
17+
- mc-data:/data
18+
- ./plugins:/plugins:ro
19+
volumes:
20+
mc-data:

scripts/start-utils

+22-10
Original file line numberDiff line numberDiff line change
@@ -464,21 +464,33 @@ function checkSum() {
464464
}
465465

466466
function usesMods() {
467-
case "$FAMILY" in
468-
FORGE | FABRIC | HYBRID | SPONGE)
467+
if isTrue "${USES_MODS:-}"; then
469468
return 0
470-
;;
471-
esac
472-
return 1
469+
470+
else
471+
case "$FAMILY" in
472+
FORGE | FABRIC | HYBRID | SPONGE)
473+
return 0
474+
;;
475+
esac
476+
return 1
477+
478+
fi
473479
}
474480

475481
function usesPlugins() {
476-
case "$FAMILY" in
477-
SPIGOT | HYBRID)
482+
if isTrue "${USES_PLUGINS:-}"; then
478483
return 0
479-
;;
480-
esac
481-
return 1
484+
485+
else
486+
case "$FAMILY" in
487+
SPIGOT | HYBRID)
488+
return 0
489+
;;
490+
esac
491+
return 1
492+
493+
fi
482494
}
483495

484496
function resolveVersion() {

0 commit comments

Comments
 (0)