Draft
Conversation
- Add lastActivity column to ClansTable for tracking clan activity - Add lastActivity field to ClanImpl (backward-compatible serialization) - Add updateLastActivity and findInactiveClanIds to ClanRepository - Add updateLastActivity and disbandInactiveClans to CoreClanService/ClanServiceImpl - Add AutoDisbandConfig to ClanConfig (disabled by default, 90 days threshold, 24h check interval) - Add periodic auto-disband background task in ClanInstance lifecycle - Track player activity on join in both Velocity (JoinInviteListener) and Paper (PlayerActivityListener) Co-authored-by: twisti-dev <76837088+twisti-dev@users.noreply.github.com>
…k immediately on startup Co-authored-by: twisti-dev <76837088+twisti-dev@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement automatic deletion of inactive clans
feat: autodisband inactive clans
Feb 24, 2026
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.
Clans accumulate over time as players create them and never use them, blocking tags and names. This adds periodic automatic deletion of clans where no member has been online within a configurable threshold.
Database
last_activitycolumn (epoch millis) onclan_clans— existing rows getNULLand are excluded from auto-disband until a member logs inActivity tracking
JoinInviteListenerupdates clanlastActivityon network joinPlayerActivityListenerdoes the same for standalone deploymentsAuto-disband task
ClanInstanceruns on a configurable interval, queries for clans withlastActivity < now - threshold, deletes them via the existingdelete()flow (cache invalidation + listener notifications)Configuration
Notes
ClanImpl.lastActivityhas a default value (null) so existing Redis-cached entries deserialize without issueslastActivity = NULL(pre-existing) are never auto-disbanded — the timer starts once any member logs in post-deploySchemaUtils.createmay not add the new column to existing tables; manual migration or switching tocreateMissingTablesAndColumnsmay be needed for existing deploymentsWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
downloads.gradle.org/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -Xmx64m -Xms64m -Dorg.gradle.appname=gradlew -jar /home/REDACTED/work/surf-clan/surf-clan/gradle/wrapper/gradle-wrapper.jar :surf-clan-runtime:dependencies --configuration runtimeClasspath(dns block)/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -Xmx64m -Xms64m -Dorg.gradle.appname=gradlew -jar /home/REDACTED/work/surf-clan/surf-clan/gradle/wrapper/gradle-wrapper.jar :surf-clan-runtime:dependencies ep/bin/linux-x64/rg(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.