Skip to content
This repository was archived by the owner on Dec 10, 2025. It is now read-only.

Conversation

@TheBjoRedCraft
Copy link
Member

@TheBjoRedCraft TheBjoRedCraft commented Jul 24, 2025

This pull request introduces a new feature to the Playtime interface and its implementation, allowing playtime data to be optionally sorted by duration. Additionally, it includes a minor localization change in the PlaytimeCommand. Below is a summary of the most important changes:

Feature: Sorting Playtime Data by Duration

  • surf-cloud-api-common/src/main/kotlin/dev/slne/surf/cloud/api/common/player/playtime/Playtime.kt: Updated methods in the Playtime interface (playtimesPerServer, playtimesPerCategory, playtimePerCategoryPerServer, topServers, and topCategories) to include an optional sortByPlaytime parameter for sorting results by playtime duration. [1] [2] [3]
  • surf-cloud-core-common/src/main/kotlin/dev/slne/surf/cloud/core/common/player/playtime/PlaytimeImpl.kt: Implemented the sortByPlaytime parameter in the corresponding methods, enabling sorting of playtime data at different levels (server, category, and category-per-server). The sorting logic was added for both individual and grouped results. [1] [2] [3]

Localization Improvement

  • surf-cloud-bukkit/src/main/kotlin/dev/slne/surf/cloud/bukkit/command/playtime/PlaytimeCommand.kt: Changed the label for "Total" playtime to "Gesamt" in the sendPlaytime method for better localization.

fixes #83

Copilot AI review requested due to automatic review settings July 24, 2025 11:58

This comment was marked as outdated.

TheBjoRedCraft and others added 3 commits July 24, 2025 13:59
…e/surf/cloud/core/common/player/playtime/PlaytimeImpl.kt

Co-authored-by: Copilot <[email protected]>
…e/surf/cloud/core/common/player/playtime/PlaytimeImpl.kt

Co-authored-by: Copilot <[email protected]>
@TheBjoRedCraft TheBjoRedCraft requested a review from Copilot July 24, 2025 12:02
Copy link
Contributor

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

This PR adds optional sorting functionality to playtime retrieval methods in the Playtime interface and implementation, allowing results to be sorted by duration in descending order. Additionally, it includes a localization change for German language support.

  • Adds sortByPlaytime parameter to three key playtime methods with default value of true
  • Implements sorting logic in PlaytimeImpl to sort results by duration in descending order
  • Updates localization from "Total" to "Gesamt" in the PlaytimeCommand

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
surf-cloud-api-common/src/main/kotlin/dev/slne/surf/cloud/api/common/player/playtime/Playtime.kt Adds sortByPlaytime parameter to interface methods
surf-cloud-core-common/src/main/kotlin/dev/slne/surf/cloud/core/common/player/playtime/PlaytimeImpl.kt Implements sorting functionality for playtime data retrieval
surf-cloud-bukkit/src/main/kotlin/dev/slne/surf/cloud/bukkit/command/playtime/PlaytimeCommand.kt Changes "Total" label to "Gesamt" for German localization

@TheBjoRedCraft TheBjoRedCraft self-assigned this Nov 15, 2025
@TheBjoRedCraft TheBjoRedCraft closed this by deleting the head repository Dec 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cloud Playtime Command

1 participant