Skip to content

Conversation

@SrBedrock
Copy link
Member

No description provided.

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.
Copilot AI review requested due to automatic review settings August 22, 2025 05:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

SrBedrock and others added 6 commits August 22, 2025 02:48
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.
@SrBedrock SrBedrock merged commit c5ca3ac into ArmaRealms:update Aug 23, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant