Repository navigation
Home
nsider4 edited this page Oct 22, 2026
·
2 revisions
The ChatGames API lets your plugin add content to ChatGames-Premium (2.0.0 and newer) and react to what happens in it. Whatever you add plays like the built-in content: server owners configure it in the same files, it shows in the same menus and leaderboards, and it works from Spigot 1.8.8 to 26.x and on Folia.
| You want to... | Use | Page |
|---|---|---|
| Ask players something in chat (a quiz, a puzzle, a reaction test, a "click first" button) | a chat game | Chat Games |
| Have players race to do something in the world (kill bosses, vote, catch custom fish, walk...) | a race | Races |
| Give your plugin's rewards (crates, keys, coins, cosmetics) from any ChatGames reward list | a reward action | Reward Actions |
| Let daily and weekly challenges count something your plugin tracks | a challenge type | Challenge Types |
| React to games: anti-cheat, Discord messages, bonus points, statistics | events | Events |
| Start or stop games, read stats, give points, show leaderboards | control and data | Games and Player Data |
- Add the API to your build and
depend: [ChatGames-Premium]to plugin.yml (Getting Started). - Register a game in
onEnable:
@Override
public void onEnable() {
ChatGamesAPI.get().registerGame(this, ChatGame.builder("capitals")
.displayName("Capitals")
.generator(context -> Question.builder("Paris")
.display("What is the capital of France?")
.build())
.build());
}- Start the server and type
/chatgames capitals. The game is also in the automatic rotation, the menus,/chatgames top, the placeholders and the challenges, with no extra code.
- Basics: Getting Started · Threads and Folia
- Adding content: Chat Games · Races · Reward Actions · Challenge Types
- Reacting and reading: Events · Games and Player Data
- Reference: What Server Owners Configure · Troubleshooting
-
Full example: the
example/plugin in the repository uses every part of the API.
Basics
Adding content
Reacting and reading
Reference