1.2.3
Compatibility
Changes
v1.2.3
This pull request introduces significant enhancements to the configuration and role management system in the LyttleAdmin plugin. The changes include updating the plugin version, refactoring the code to centralize role-related actions, and adding new configuration types for better flexibility and maintainability. Additionally, it removes hardcoded role management logic and replaces it with a dynamic configuration-driven approach.
Configuration Updates:
- Version Updates: Updated
pluginVersionto1.2.3andpaperVersionto1.21.8ingradle.propertiesfor compatibility with newer versions. - Default Configs: Added
defaultGeneralconfiguration inConfigs.javato support default values for general settings.
Role Management Refactoring:
- Dynamic Role Actions: Replaced hardcoded role management methods (
giveRole,removeRole, etc.) with a centralizedrunActionsmethod that dynamically handles role actions based on configurations. - Role Configuration System: Introduced new POJO classes (
RolesConfig,RoleConfig,ActionsConfig,RoleAction,RoleChange,BroadcastConfig) to encapsulate role-related settings and actions.
Code Simplification:
- Staff Mode Logic: Consolidated
onStaffModeEnabledandonStaffModeDisabledlogic to use the newrunActionsmethod, removing redundant methods likeonStaffModeEnabledAdminandonStaffModeEnabledModerator. - Utility Enhancements: Added
RolesConfigLoaderutility for converting configuration objects into POJOs.
Logging Improvements:
- Error Handling: Enhanced logging for errors during staff mode enable/disable actions to improve debugging.
These changes improve the scalability and maintainability of the plugin by leveraging configuration-driven logic and reducing hardcoded dependencies.
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:uzgwKskt:li5dzWUG"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:uzgwKskt:li5dzWUG"
}

