Loose Ends Lib
A library for managing server and client behavior when connecting without the installed mod. This tool provides flexible control over compatibility between different environment versions.
Installation
To connect the library to your project, add the following lines to the build.gradle file:
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
modImplementation 'com.github.Totobird-Creations:LooseEndsLib:${looseendslib_version}'
// Optional dependency
include 'com.github.Totobird-Creations:LooseEndsLib:${looseendslib_version}'
}
And in the gradle.properties file specify the version:
looseendslib_version = v1.0.3-mc1.19
Usage
In the onInitialize method of your initializer, add the following code:
LooseEndManager.getInstance().register(mod_id, mod_name, mod_version)
.whenClientJoins(condition)
.whenJoinServer(condition).
Available conditions:
LooseEnd.Condition.REQUIRED- Mandatory mod presence from the other participantLooseEnd.Condition.NONE- No restrictions whatsoeverLooseEnd.Condition.DISALLOWED- Prohibition of mod presence from the other participant