Addon for Discord Integration.
Addons are installed to SERVER/DiscordIntegration-Data/addons
so put the DCIFIleReader-0.0.1.jar
there.
If you are using an older mod version with java 11 or higher and you are getting errors, please start the server with java --add-opens java.base/java.io=ALL-UNNAMED -jar SERVER.jar
- Use
/readfile <file-name>
to read a file from '/DiscordIntegration-Data/addons/' folder. By default it reads from inside this folder. - Use
/filereader permissions
to lists all permissions currently set in theDCIFileReader.toml
config. - Use
/filereader whitelist
to list all the file names in the whitelist. The whitelist can be found in theDCIFileReader.toml
config aswhitelist = [""]
To reload config, use /discord reload
in-game or in console as its a default command from Discord Integration.
- By default, admin mode
adminOnly
equalstrue
in the config. - A feature in this addon is changing directories to search for files in. As such, You can go back a directory using
..
in the file name and forward a directory with/
. By default,allowDirectoryEscalation
is set tofalse
in the config which disallows the direct use of..
for changing directories/directory escalation. - Allowing directory changing can expose the server's file tree structure, including the files of the computer it is running on.
- By default,
whitelistNamesOnly
is set tofalse
in the config, set this totrue
if you'd like to prevent the above scenario and only allow files YOU want and trusted people to access. - Again,
readfile
this is a read-only command. But it doesn't take much to discover endpoints and secrets.
Make sure the following tools are installed on your system:
When building use the corresponding supported Java Version that the Version of Minecraft Supports. Example: For Minecraft Java 1.21+, use Java jdk 21.
- Java Development Kit (JDK): Install JDK 21 or later. You can download it from AdoptOpenJDK or Oracle JDK.
- Gradle (optional): Gradle installation is optional as the project’s Gradle Wrapper will handle it.
Run the following commands to ensure the tools are installed correctly:
# Verify JDK installation
java -version
OR
Move into the cloned repository:
- Locate the downloaded ZIP file in File Explorer.
- Right-click the ZIP file and select Extract All....
- Choose a destination folder and click Extract.
- Locate the downloaded ZIP file in Finder.
- Double-click the ZIP file to automatically extract its contents to a folder in the same directory.
Run the following command in the terminal:
unzip DCIFileReader.zip
Replace DCIFileReader.zip
with the actual name of the ZIP file if it differs.
After extraction, navigate to the extracted folder:
cd DCIFileReader
Use the Gradle Wrapper to build the project. This ensures that you don’t need a global Gradle installation.
.\gradlew build
./gradlew build
Gradle will automatically download the required dependencies and compile the project. Once the build is complete, you should see:
BUILD SUCCESSFUL
The output files, including the JAR file, will be located in the build/libs
directory:
ls build/libs
Look for a file named something like DCIFileReader-<version>.jar
.
- JDK Issues: Ensure you have the correct JDK version installed and configured.
- Gradle Errors: Check the repository’s README file for any additional instructions or requirements.
- Dependencies: Gradle will handle most dependencies automatically, but ensure you have an active internet connection for the first build.
Feel free to reach out if you encounter any issues!