The project can be built by downloading it, navigating into the directory, and running ./gradlew build
or
gradlew.bat build
on Windows.
The compiled jar be build/Ion.jar
and build/IonCore.jar
.
This repository includes a script that will set up a functioning system comprising of Ion, IonCore, and its critical
dependencies. To use it simply ensure that Docker and Docker Compose are installed and running, and then use
testServer
. This script is a bash script, using it on Windows will require Windows Subsystem for Linux or Git Bash.
Simply run sh testServer run
, you will be able to send commands in the terminal, but they will not appear as you type.
If the test server breaks, use sh testServer reset
to reset it back to it's default state.
Contributions must follow the following rules:
-
Lines should be 120 characters long at most, this is not a strict requirement, lines can be longer.
-
Never use wildcard imports.
-
Sometimes there can be name conflicts when importing, import them with a custom name, prefixed by the source. For example "LibAListener" and "LibBListener".
-
Avoid excessive use of
.apply {}
or similar. -
Do not statically import individual elements from enums or objects.
-
If there is a large block of mostly similar code, align it with spaces, as it makes things more readable.
-
Any additions that absolutely requires IonCore to function should go there, otherwise it goes in the main project.
-
All event listeners must specify a priority based on the criteria below:
- Does the listener unconditionally cancel the event? If so, use LOWEST.
- Does the listener conditionally cancel the event? If so, use LOW.
- Does the listener alter the events data? If so, use NORMAL.
- Does the listener simply act on the result of the event? If so, use MONITOR.
- HIGH and HIGHEST should not be used right now.
-
To prevent IntelliJ from complaining, please
@Suppress("unused")
for any entry points. Don't just tell IntelliJ to ignore them for that class as that only applies to you, not everyone else. -
These rules are more relaxed with IonCore, but should still be kept to if possible.