# Progress Bars

### Overview

The `ProgressBar` class provides a utility for generating progress bars based on current and maximum values.

### Methods

#### `getProgressBar`

```java
public static String getProgressBar(int current, int max, int totalBars, char symbol, ChatColor completedColor, ChatColor notCompletedColor)
```

Generates a progress bar string based on the current and maximum values.

**Parameters**

* `current`: The current value.
* `max`: The maximum value.
* `totalBars`: The total number of bars in the progress bar.
* `symbol`: The symbol used to represent progress.
* `completedColor`: The ChatColor for the completed part of the progress bar.
* `notCompletedColor`: The ChatColor for the incomplete part of the progress bar.

**Returns**

* Returns a string representing the progress bar.

### Example Usage

```java
int current = 50;
int max = 100;
int totalBars = 10;
char symbol = '|';
ChatColor completedColor = ChatColor.GREEN;
ChatColor notCompletedColor = ChatColor.RED;

String progressBar = ProgressBar.getProgressBar(current, max, totalBars, symbol, completedColor, notCompletedColor);
System.out.println(progressBar);
```

In this example, we use the `getProgressBar` method to generate a progress bar string based on the current and maximum values, with a total of 10 bars, using the '|' symbol, and green for completed and red for incomplete parts of the progress bar.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://glitchtechs.gitbook.io/galaxy/starapi-spigot-paper/misc/progress-bars.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
