The plugin allows binding a GitHub account to a player and displaying information about it via PlaceholdersAPI.
- Java 8+ or higher
- Spigot / Paper from version 1.12 up to the latest
- Installed PlaceholdersAPI plugin version 2.12.2 or newer
- The player binds their GitHub nickname with the command
/githubapi link <username>. - The plugin saves the connection in MySQL and creates a session to retrieve data from the GitHub API upon player login.
- Data is updated only when the player re-enters the server.
- An administrator displays information via the plugin's placeholders (PlaceholdersAPI required).
Important
The /githubapi link command makes a direct HTTP request to GitHub. It is recommended to set a cooldown to prevent
API blocking.
- PlaceholdersAPI – mandatory plugin for displaying information. Without it, placeholders will not work.
- HikariCP
- SL4J
- BStats
All placeholders follow the format %githubapi_<parameter>%.
Examples: %githubapi_login%, %githubapi_name%, %githubapi_bio%.
| Parameter | Description |
|---|---|
login |
User login |
id |
User ID |
type |
User type |
name |
User name |
company |
Company |
blog |
Blog/website link |
location |
Location |
email |
Email address |
hireable |
Available for hire |
bio |
Biography |
followers |
Number of followers |
following |
Number of following |
node_id |
GraphQL node ID |
twitter_username |
Twitter username |
created_at |
Account creation date |
updated_at |
Last update date |
public_repos |
Number of public repositories |
public_gists |
Number of public Gists |
site_admin |
Is site admin |
user_view_type |
User display type |
- Download the ready JAR file from the Releases section.
- Place the file into your server’s
pluginsfolder. - Restart the server.
- Configure the MySQL connection in
config.yml(see the "Configuration" section). - Grant players the necessary permissions (see the "Permissions" section).
The config.yml file is created automatically on first run. It contains:
- Database connection settings (host, port, database name, user, password)
- All messages visible to players (translatable strings)
Warning
After modifying config.yml, you must fully restart the server.
- Only MySQL and SQLite are supported
- Queries are executed asynchronously using a pool of 5 threads.
- When unloading the plugin, the thread pool is properly shut down.
The thread pool is limited to 5 threads:
private final ExecutorService dbExecutorService = Executors.newFixedThreadPool(5);The main server command is /githubapi. Subcommands:
| Command | Description |
|---|---|
/githubapi link <gitUsername> |
Bind a GitHub account |
/githubapi show |
Show the bound GitHub account |
| Permission | Description |
|---|---|
githubapi.command |
Access to the main /githubapi command |
githubapi.command.link |
Access to the link subcommand |
githubapi.command.show |
Access to the show subcommand |
If you want to build the plugin yourself:
- Install Java 8 or newer
- Install Maven (instructions: maven.apache.org)
git clone https://github.com/Kredwi/GitHubAPIPlugin
cd GitHubAPIPlugin
mvn packageThe compiled JAR will be located in the target/ folder with the name GithubAPIPlugin-<VERSION>-SNAPSHOT.jar.
| Request type | Limit per hour | Token required |
|---|---|---|
| Without token (server IP) | 60 | ❌ |
| With token | 5000 | ✅ |
If the limit is exceeded, the plugin will return empty values until the next hour.
This project is licensed under the Apache License 2.0.
More details: LICENSE