Skip to content

Integrate with Better Scoreboard for faction placeholders #18

@derrickmehaffy

Description

@derrickmehaffy

Feature Description

Integrate with Better Scoreboard to expose HyperFactions placeholders that server owners can display on their scoreboard.

Better Scoreboard supports custom placeholders from other plugins and displays real-time info on a sidebar scoreboard. This integration would allow servers to show faction information directly on the player's HUD.

Proposed Solution

Register HyperFactions placeholders with Better Scoreboard:

Placeholder Description Example
{faction} Player's faction name Vikings
{faction_tag} Faction tag/prefix [VKG]
{faction_role} Player's role in faction Officer
{faction_power} Player's current power 10.0
{faction_maxpower} Player's max power 10.0
{faction_power_total} Faction's total power 87.5
{faction_power_max} Faction's max power 100.0
{faction_land} Number of claimed chunks 15
{faction_land_max} Max claimable chunks 20
{faction_members} Online member count 5/12
{faction_allies} Number of allied factions 3
{faction_enemies} Number of enemy factions 2
{territory_owner} Faction owning current chunk Spartans
{territory_type} Territory type at location SafeZone

Implementation:

  1. Detect Better Scoreboard at runtime (soft dependency)
  2. Register placeholder provider via Better Scoreboard API
  3. Update placeholders in real-time as faction data changes
  4. Return empty string or configurable default for factionless players

Example scoreboard configuration:

Faction: {faction}
Role: {faction_role}
Power: {faction_power}/{faction_maxpower}
Land: {faction_land}/{faction_land_max}
Territory: {territory_owner}

Alternatives Considered

  1. Built-in HyperFactions HUD - Create our own scoreboard (duplicates functionality)
  2. PlaceholderAPI-style system - Generic placeholder system for any mod to consume
  3. Config-based display - Let admins configure what shows in Better Scoreboard from our config

Additional Context

  • Better Scoreboard requires MultipleHUD dependency
  • Placeholders should update efficiently (cache values, don't recalculate every frame)
  • Consider world-specific scoreboard support (different info in different worlds)
  • Permission: No special permission needed (uses existing faction membership)
  • Soft dependency - HyperFactions works without Better Scoreboard installed

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions