feat: add global rejoin cooldown option#17
Merged
SrBedrock merged 11 commits intoArmaRealms:updatefrom Aug 23, 2025
SrBedrock:codex/add-getminutesbeforeaction-method
Merged
feat: add global rejoin cooldown option#17SrBedrock merged 11 commits intoArmaRealms:updatefrom SrBedrock:codex/add-getminutesbeforeaction-method
SrBedrock merged 11 commits intoArmaRealms:updatefrom
SrBedrock:codex/add-getminutesbeforeaction-method
Conversation
Bumped the PlaceholderAPI dependency version from 2.11.3 to 2.11.6 in pom.xml to use the latest features and bug fixes.
Updated all method parameters in ClanManager.java to use the 'final' modifier for improved code safety and clarity. This change helps prevent accidental reassignment of parameters within methods.
Updated two instances of 'out.length() == 0' to use 'out.isEmpty()' for improved readability and consistency in ClanManager.java.
Added @NotNull annotation to ClanPlayer#getResignTimes to clarify non-null contract. Refactored ClanManager to remove redundant null check and improve variable naming for resign times map.
There was a problem hiding this comment.
Pull Request Overview
Adds support for a global rejoin cooldown feature that prevents players from creating new clans for a configured period after leaving any clan, as opposed to the existing per-clan rejoin cooldown.
Key changes:
- Introduces global rejoin cooldown configuration option alongside existing per-clan rejoin cooldown
- Implements cooldown validation for clan creation to prevent abuse through clan hopping
- Updates PlaceholderAPI dependency to newer version
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| wiki/how-to-setup/configuration.md | Documents the new rejoin-cooldown-global configuration option |
| src/main/resources/config.yml | Adds the global rejoin cooldown setting with default value false |
| src/main/java/net/sacredlabyrinth/phaed/simpleclans/managers/SettingsManager.java | Defines the configuration field for global rejoin cooldown |
| src/main/java/net/sacredlabyrinth/phaed/simpleclans/managers/ClanManager.java | Implements global cooldown logic and refactors existing rejoin methods |
| src/main/java/net/sacredlabyrinth/phaed/simpleclans/commands/general/GeneralCommands.java | Adds cooldown validation to clan creation command |
| src/main/java/net/sacredlabyrinth/phaed/simpleclans/ClanPlayer.java | Adds @NotNull annotation to getResignTimes method |
| src/main/resources/messages*.properties | Adds localized message for global cooldown violation |
| pom.xml | Updates PlaceholderAPI dependency from 2.11.3 to 2.11.6 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Imported GLOBAL_REJOIN_COOLDOWN from SettingsManager.ConfigField in ClanManager. This prepares the manager for usage of the new configuration option.
VentureChatListener now extends SCListener and uses the plugin instance directly to access managers. This simplifies the constructor and removes redundant fields, improving code maintainability.
Changed the type of the 'cooldown' variable from long to int to match the return type of settings.getInt(REJOIN_COOLDOWN).
Added 'final' keyword to method parameters and local variables in ClanCommands.java and GeneralCommands.java for improved code safety and clarity. Also replaced wildcard and grouped imports with explicit imports in GeneralCommands.java to enhance readability and maintainability.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.