Skip to content

Server Config


General Configuration

The file server_config.json is the core configuration for Cobblemon BattleHUB. It is generated automatically on the mod's first startup inside your server directory.

File Path

config/cobblemon_battlehub/server_config.json

Default Configuration Template

Below is the template with the official structure generated by the ServerConfig class for quick reference:

{
  "guiTheme": "DEFAULT",
  "activeRankedLadders": [
    "singles_ranked",
    "doubles_ranked",
    "triples_ranked"
  ],
  "activeCasualLadders": [
    "singles_50_casual",
    "doubles_50_casual",
    "monotype_50_casual",
    "singles_100_casual",
    "doubles_100_casual",
    "triples_100_casual",
    "monotype_100_casual"
  ],
  "actionTimerSeconds": 30,
  "afkStrikeLimit": 3,
  "afkExtensionSeconds": 15,
  "maxAfkAutopilotRounds": 3,
  "autopilotActionSeconds": 5,
  "allowEntityInteractionInQueue": false,
  "dailyLimitRankedEnabled": true,
  "dailyLimitRanked": 10,
  "dailyLimitCasualEnabled": false,
  "dailyLimitCasual": 10,
  "currentSeasonNumber": 1,
  "currentSeasonId": "season_1",
  "currentSeasonName": "Season 1",
  "currentSeasonStartedAtMs": 1718064000000,
  "completedRankedSeasons": [],
  "rewards": {
    "milestoneRewardsEnabled": true,
    "seasonRewardsEnabled": true,
    "milestoneRewards": [
      {
        "id": "ranked_wins_10",
        "title": "10 Ranked Wins",
        "statType": "RANKED_WINS",
        "threshold": 10,
        "commands": [
          "give %player% minecraft:diamond 5"
        ]
      },
      {
        "id": "ranked_wins_25",
        "title": "25 Ranked Wins",
        "statType": "RANKED_WINS",
        "threshold": 25,
        "commands": [
          "give %player% minecraft:netherite_ingot 1"
        ]
      },
      {
        "id": "arena_matches_50",
        "title": "50 Arena Matches",
        "statType": "TOTAL_BATTLES",
        "threshold": 50,
        "commands": [
          "eco give %player% 1000"
        ]
      }
    ],
    "seasonEndRewards": {
      "placementRewards": [
        {
          "maxPlacement": 1,
          "minimumGames": 5,
          "commands": [
            "lp user %player% parent add top1"
          ]
        },
        {
          "maxPlacement": 3,
          "minimumGames": 10,
          "commands": [
            "lp user %player% parent add top3"
          ]
        },
        {
          "maxPlacement": 10,
          "minimumGames": 20,
          "commands": [
            "eco give %player% 5000"
          ]
        }
      ],
      "participationReward": {
        "minimumGames": 15,
        "commands": [
          "give %player% cobblemon:poke_ball 15"
        ]
      }
    }
  }
}

Detailed Parameter Explanation

1. Active Categories (Ladders)

  • activeRankedLadders: List of IDs for competitive (ranked) categories that will be available in the server queues.
  • activeCasualLadders: List of IDs for non-ranked (casual) categories available for quick matchmaking.

2. Timers and Anti-AFK System

  • actionTimerSeconds (Default: 30): Maximum time (in seconds) a player has to make a decision on their battle turn.
  • afkStrikeLimit (Default: 3): Number of times a player can timeout before penalties are applied.
  • afkExtensionSeconds (Default: 15): Additional seconds granted by the system in specific lock/reconnect situations.
  • maxAfkAutopilotRounds (Default: 3): Limit of consecutive turns the autopilot can act automatically before the player is removed for AFK.
  • autopilotActionSeconds (Default: 5): Autopilot response time after the player's timer has fully expired.

3. Seasons

  • currentSeasonNumber: Incremental counter identifying the ordinal number of the current season.
  • currentSeasonId: Internal identifier generated by the mod logic for storage (e.g., season_1).
  • currentSeasonName: Display name of the active season (e.g., Season 1).
  • currentSeasonStartedAtMs: Unix timestamp in milliseconds marking the exact start of the active season.
  • completedRankedSeasons: Archive list storing data of all finished seasons rolled over by /bh season rollover.

4. Rewards System

Automates giving items, currency, or permissions via console commands when milestones are reached.

Global Settings

  • milestoneRewardsEnabled: (true/false) Enables or disables milestone rewards for player progress.
  • seasonRewardsEnabled: (true/false) Enables or disables end-of-season rewards for top placements.

Milestone Rewards (milestoneRewards)

Array where you register specific in-game milestones:

  • id: Unique string to record reward redemption and prevent duplicate claims.
  • title: Visual name displayed to players.
  • statType: Statistic evaluated by the trigger. Supported options in the Java class:
  • TOTAL_BATTLES: Total duels fought (Ranked + Casual).
  • RANKED_WINS: Total wins in the ranked queue.
  • RANKED_MATCHES: Number of matches played in the ranked queue.
  • QUICK_WINS: Wins in casual matches.
  • QUICK_MATCHES: Completed casual matches.
  • threshold: Target number of wins or matches to unlock the reward.
  • commands: List of console commands to run. The placeholder %player% is automatically replaced with the player's name.

End-of-Season Rewards (seasonEndRewards)

  • placementRewards: List of prizes for top placements.
  • maxPlacement: Maximum eligible placement (e.g., 1 grants only Top 1; 3 awards Top 1..3).
  • minimumGames: Minimum number of matches a player must have completed in the season to be eligible.
  • commands: Console commands to be executed for winners.
  • participationReward: Consolation prize for participation.
  • minimumGames: Minimum matches required to qualify for participation reward.
  • commands: Commands executed to reward eligible participants.

5. GUI and Daily Limits

  • guiTheme: Defines the visual theme of the mod GUI. Available presets: DEFAULT, POKE, GREAT, ULTRA, QUICK, DUSK, MASTER.

  • dailyLimitRankedEnabled (true/false): Enables or disables the daily cap for competitive matches per player.

  • dailyLimitRanked: Maximum number of Ranked matches a player can play per day.
  • dailyLimitCasualEnabled (true/false): Enables or disables the daily cap for casual matches per day.
  • dailyLimitCasual: Maximum number of Casual matches a player can play per day.

6. Interaction While in Queue (since 1.4)

  • allowEntityInteractionInQueue (true/false, Default: false): While a player is in a queue, the mod blocks right-clicking entities (other players, NPCs...), blocks (PCs, healing machines, chests...) and most commands. Setting this to true lets queued players interact with entities — needed by servers that open the BattleHUB menu from an NPC. Blocks and commands stay blocked. Players who are preparing a tournament match keep all three locks regardless of this option. Apply it with /bh reload.