Skip to content

Conversation

cp12r
Copy link

@cp12r cp12r commented Mar 25, 2025

**Improved Readability:**
    Used meaningful method names and added comments to clarify the purpose of each method.

**New Methods:**
    updateScoreboardWithShopInfo(Player player, int shards): Updates the player's scoreboard with their current shard count.
    refreshAllScoreboards(): Refreshes the scoreboard for all players in the game.
    refreshSidebarForPlayer(Player player): Refreshes the sidebar for a specific player.

**Shop Information Handling:**
    The updateScoreboardWithShopInfo method allows for easy integration of shop-related data into the player's scoreboard.

Usage:

Call updateScoreboardWithShopInfo(player, shards) whenever a player buys an item from the shop to update their scoreboard with the new shard count.
Use refreshAllScoreboards() to refresh all players' scoreboards, for example, after a game reset or when a significant event occurs.

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