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 /readfile <file-name> <search>to search for content within the file. Useful if file is too large.
 
- Use 
- Use /filereader permissionsto lists all permissions currently set in theDCIFileReader.tomlconfig.
- Use /filereader whitelistto list all the file names in the whitelist. The whitelist can be found in theDCIFileReader.tomlconfig aswhitelist = {""}
To reload config, use /discord reload in-game or in console as its a default command from Discord Integration.
- By default, admin mode adminOnlyequalstruein 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, allowDirectoryEscalationis set tofalsein the config which disallows the direct use of..for changing directories/directory escalation.
 
- By default, 
- Allowing directory changing can expose the server's file tree structure, including the files of the computer it is running on.
- By default, whitelistNamesOnlyis set tofalsein the config, set this totrueif you'd like to prevent the above scenario and only allow files YOU want and trusted people to access.
- Although this addon is only reading files, 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 -versionOR
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.zipReplace DCIFileReader.zip with the actual name of the ZIP file if it differs.
After extraction, navigate to the extracted folder:
cd DCIFileReaderUse the Gradle Wrapper to build the project. This ensures that you don’t need a global Gradle installation.
.\gradlew build./gradlew buildGradle 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/libsLook 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!
