Simple Discord Webhook Leave/Join Notification

Simple Discord Webhook Leave/Join Notification

397 Downloads

Migrate to Fabric server

zdwolfe opened this issue ยท 0 comments

commented

Background

This mod was built using the Spigot mod loader loader, and hasn't been updated for years. Since my server now runs Fabric, it'd be nice to entirely migrate this mod, and/or support both Fabric and Spigot.

Detail

  1. Rework the mod to support being run on Fabric 1.20.1.
  2. It's probably best to start fresh with a Fabric Example mod as a template, and port the innards, rather than try to get Fabric working in mvn.

Build & Run

The README shows how to build using mvn. Instead, it would be nice to have something like the following to avoid needing a local gradlew build (which is the Java build system Fabric mods start with instead of mvn).

docker run --volume ./:/minecraft-player-notification-plugin  --workdir /minecraft-player-notification-plugin -it public.ecr.aws/amazoncorretto/amazoncorretto:17 /minecraft-player-notification-plugin/gradlew build

The README also has steps to start a server, but it's probably better to rework that to use https://hub.docker.com/r/itzg/minecraft-server instead, as that's what I use in production (and also update the README):

docker run --name minecraft-server --memory=2g -d -it -p 25565:25565 -v ./localdev/data:/data -e EULA=TRUE -e TYPE=FABRIC -e FORCE_REDOWNLOAD=true -e VERSION=1.20-rc1 -e MEMORY="" -e JVM_XX_OPTS="-XX:MaxRAMPercentage=75" -e USE_NATIVE_TRANSPORT=true -e ENABLE_ROLLING_LOGS=true itzg/minecraft-server:java17

Finally there will be some setup to get the minecraft mod jar in the right spot (./localdev/data locally) in the server.

Code Entrypoint

The best spot to start for this mod is in Main.java. I assume Fabric something analogous, and also has analogous events for player leave/join.