Skip to content

feat: PAPI плейсхолдеры команды#11

Merged
EnderDissa merged 4 commits into
devfrom
feat-placeholders
May 8, 2026
Merged

feat: PAPI плейсхолдеры команды#11
EnderDissa merged 4 commits into
devfrom
feat-placeholders

Conversation

@EnderDissa
Copy link
Copy Markdown
Member

No description provided.

@EnderDissa EnderDissa changed the base branch from feat-voicechat to dev May 8, 2026 22:00
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3febcad31c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}

val online = player?.player ?: return ""
val style = safe { MiniGamesAPI.getCurrentTeamStyle(online) }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Cache team styles for placeholder requests

When these placeholders are used by a tab list or scoreboard, this line runs for every rendered player and placeholder refresh; MiniGamesAPI.getCurrentTeamStyle() calls getTeamStyle(), and TeamStyleProvider.get() reloads minigamesapi/config.yml via YamlConfiguration.loadConfiguration(...) on each call. In common configs like %joutak_games_team_color%[%joutak_games_team_name%], that creates repeated disk I/O on the placeholder hot path and can stall the server main thread, so the integration should cache/preload team styles or expose the snapshotted team index separately from the file-backed style lookup.

Useful? React with 👍 / 👎.

EnderDissa and others added 3 commits May 9, 2026 01:20
material/color/name живут в config.yml: teamselect.teams.<n>, единый источник
правды для GUI выбора, лобби-скорборда и режимов. Добавлен публичный API
TeamStyle/TeamStyleProvider — моды читают стили оттуда вместо хардкода.

v4-миграция: переносит имена из messages.yml: ui.teamselect.teams.<n>.name
в config.yml: teamselect.teams.<n>.name (если в config ещё нет), затем
вырезает legacy-секцию из messages.yml. Existing моды визуально не меняются.

Voicechat-интеграция (TeamGroupManager) использует новый API для имени команды
вместо собственного парсера messages.yml.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Группы распускаются на конце матча: новый MatchResultRecordingEvent
  фаерится из MiniGamesAPI.recordMatchResult, TeamGroupManager сносит
  группы в этот момент (типично — после церемонии). GameInstanceEndedEvent
  остаётся страховкой для модов, не зовущих recordMatchResult.

- JoinGroupEvent guard: в группу пускает только своих участников команды
  и зарегистрированных наблюдателей. TeamGroupManager хранит
  groupOwnerByGroupId / playerOriginalGroup / spectatorAccess; всё
  чистится при teardown. Без паролей — игрок может выйти из группы и
  вернуться (своей) без участия админа.

- Public API на MiniGamesAPI: allowVoiceSpectator/revokeVoiceSpectator
  (мод регистрирует наблюдателей) и findActiveMatchInstance (helper для
  поиска инстанса по игроку). Вызов идёт через VoiceSpectatorRegistry —
  cross-package indirection, чтобы не тянуть de.maxhenkel.* классы на
  серверах без SVC.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@EnderDissa EnderDissa force-pushed the feat-placeholders branch from 3febcad to 1998f1e Compare May 8, 2026 22:26
@EnderDissa EnderDissa merged commit 20bad1e into dev May 8, 2026
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