This mod upgrade the existing javacord 2.0.17 to javacord 3.8.0.
This project is build with gradle.
-
Clone / Download the git repository source code.
Git CLI:git clone https://github.com/TheDialgaTeam-Project-Zomboid-Mods/PZ-Discord-Patch.git
-
Edit
build.gradle.kts
rootDir to your Project Zomboid Dedicated Server location.
For Windows:val rootDir = "C:/Program Files (x86)/Steam/steamapps/common/Project Zomboid Dedicated Server/"
-
Build the program with
gradle
.
CLI:gradlew shadowJar
Note: This require root access to your Project Zomboid Dedicated Server directory. If you are using a hosting provider that host the PZ server for you, you are unable to do the installation as you can't change the classpath.
-
Copy
PZDiscordPatch-1.0.0.jar
into Project Zomboid Dedicated Server's java directory.
For Windows:C:/Program Files (x86)/Steam/steamapps/common/Project Zomboid Dedicated Server/java/
-
Edit the classpath to include
java/PZDiscordPatch-1.0.0.jar
at the beginning. (For json file, please put it beforejava/.
entry) -
Restart your server and check the console. If done right, it should complain about missing Log4j2 as Project Zomboid uses a custom Logger. (
org.javacord.core.util.logging.ExceptionLoggerDelegateImpl No Log4j2 compatible logger was found. Using default Javacord implementation!
)
Note that you are required to enable the Message Content Intent for the bot that you have created. Otherwise discord module will not run.